From a79149b73f3c74b7d35ec230702fc9f61c2ede3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 19 Feb 2021 11:12:05 -0800 Subject: [PATCH] feat: added support for test cases and agent validation (#141) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/549c8707-14a7-4963-9d20-bbd5d5285b08/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 357800868 Source-Link: https://github.com/googleapis/googleapis/commit/e8bc4471a88ac5f60defe3ed436f517174e59ba0 PiperOrigin-RevId: 357788001 Source-Link: https://github.com/googleapis/googleapis/commit/2bea43cdc7a4443876380732980d83cd8d560582 PiperOrigin-RevId: 357757017 Source-Link: https://github.com/googleapis/googleapis/commit/38d77abda7059f562774af4ea4107415224d2674 PiperOrigin-RevId: 356804449 Source-Link: https://github.com/googleapis/googleapis/commit/6de7abea4c424025bfcf996ef40c96e53c070100 PiperOrigin-RevId: 356624136 Source-Link: https://github.com/googleapis/googleapis/commit/e28aa8570dc86136fe677202c976f4ee00d77f61 PiperOrigin-RevId: 356341083 Source-Link: https://github.com/googleapis/googleapis/commit/8d8c008e56f1af31d57f75561e0f1848ffb29eeb PiperOrigin-RevId: 354553780 Source-Link: https://github.com/googleapis/googleapis/commit/c71a9c4ff7bc5179f2e94af31bc95ce4922575ff PiperOrigin-RevId: 354550974 Source-Link: https://github.com/googleapis/googleapis/commit/ed71e24d908d7064311bf3e63282e68d2f683f04 PiperOrigin-RevId: 353783208 Source-Link: https://github.com/googleapis/googleapis/commit/6fa7194aba4d0c501592dea28c041890265079dc PiperOrigin-RevId: 353683381 Source-Link: https://github.com/googleapis/googleapis/commit/2e29020ce87808b810deb20e0925b7e26c5e72c1 PiperOrigin-RevId: 353075593 Source-Link: https://github.com/googleapis/googleapis/commit/cb932c5caa751435dfd0a9a15f655a0626d8a1cb PiperOrigin-RevId: 352834280 Source-Link: https://github.com/googleapis/googleapis/commit/f83715b48369c8d43548cc3cd84015e60be94cf2 feat: Add new Experiment service feat: supports SentimentAnalysisResult in webhook request feat: Support transition route group coverage for Test Cases fix: RunTestCase http template. PHP REST client lib can be generated chore: update gapic-generator-java to 0.0.20 docs: generate sample code in the Java microgenerator docs: minor doc update on redact field in intent.proto and page.proto docs: minor updates in wording docs: test cases doc update --- .../cloud/dialogflow/cx/v3/AgentsClient.java | 478 ++ .../dialogflow/cx/v3/AgentsSettings.java | 23 + .../dialogflow/cx/v3/EntityTypesClient.java | 281 + .../dialogflow/cx/v3/EnvironmentsClient.java | 383 ++ .../dialogflow/cx/v3/ExperimentsClient.java | 388 ++ .../cloud/dialogflow/cx/v3/FlowsClient.java | 470 ++ .../cloud/dialogflow/cx/v3/FlowsSettings.java | 23 + .../cloud/dialogflow/cx/v3/IntentsClient.java | 254 + .../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 | 1395 ++++ .../dialogflow/cx/v3/TestCasesSettings.java | 355 + .../cx/v3/TransitionRouteGroupsClient.java | 363 ++ .../dialogflow/cx/v3/VersionsClient.java | 349 + .../dialogflow/cx/v3/WebhooksClient.java | 250 + .../cloud/dialogflow/cx/v3/package-info.java | 127 + .../dialogflow/cx/v3/stub/AgentsStub.java | 12 + .../cx/v3/stub/AgentsStubSettings.java | 58 +- .../dialogflow/cx/v3/stub/FlowsStub.java | 12 + .../cx/v3/stub/FlowsStubSettings.java | 57 +- .../dialogflow/cx/v3/stub/GrpcAgentsStub.java | 84 + .../cx/v3/stub/GrpcEntityTypesStub.java | 6 + .../cx/v3/stub/GrpcEnvironmentsStub.java | 10 + .../cx/v3/stub/GrpcExperimentsStub.java | 8 + .../dialogflow/cx/v3/stub/GrpcFlowsStub.java | 81 + .../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 + .../v3/stub/GrpcTestCasesCallableFactory.java | 113 + .../cx/v3/stub/GrpcTestCasesStub.java | 602 ++ .../stub/GrpcTransitionRouteGroupsStub.java | 6 + .../cx/v3/stub/GrpcVersionsStub.java | 9 + .../cx/v3/stub/GrpcWebhooksStub.java | 6 + .../dialogflow/cx/v3/stub/TestCasesStub.java | 146 + .../cx/v3/stub/TestCasesStubSettings.java | 867 +++ .../dialogflow/cx/v3beta1/AgentsClient.java | 478 ++ .../dialogflow/cx/v3beta1/AgentsSettings.java | 23 + .../cx/v3beta1/EntityTypesClient.java | 281 + .../cx/v3beta1/EnvironmentsClient.java | 383 ++ .../cx/v3beta1/ExperimentsClient.java | 388 ++ .../dialogflow/cx/v3beta1/FlowsClient.java | 470 ++ .../dialogflow/cx/v3beta1/FlowsSettings.java | 23 + .../dialogflow/cx/v3beta1/IntentsClient.java | 254 + .../dialogflow/cx/v3beta1/PagesClient.java | 266 + .../SecuritySettingsServiceClient.java | 301 + .../cx/v3beta1/SessionEntityTypesClient.java | 302 + .../dialogflow/cx/v3beta1/SessionsClient.java | 138 + .../cx/v3beta1/TestCasesClient.java | 1397 ++++ .../cx/v3beta1/TestCasesSettings.java | 356 + .../v3beta1/TransitionRouteGroupsClient.java | 363 ++ .../dialogflow/cx/v3beta1/VersionsClient.java | 349 + .../dialogflow/cx/v3beta1/WebhooksClient.java | 250 + .../dialogflow/cx/v3beta1/package-info.java | 128 + .../cx/v3beta1/stub/AgentsStub.java | 12 + .../cx/v3beta1/stub/AgentsStubSettings.java | 58 +- .../dialogflow/cx/v3beta1/stub/FlowsStub.java | 12 + .../cx/v3beta1/stub/FlowsStubSettings.java | 57 +- .../cx/v3beta1/stub/GrpcAgentsStub.java | 85 + .../cx/v3beta1/stub/GrpcEntityTypesStub.java | 6 + .../cx/v3beta1/stub/GrpcEnvironmentsStub.java | 10 + .../cx/v3beta1/stub/GrpcExperimentsStub.java | 8 + .../cx/v3beta1/stub/GrpcFlowsStub.java | 81 + .../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 + .../stub/GrpcTestCasesCallableFactory.java | 115 + .../cx/v3beta1/stub/GrpcTestCasesStub.java | 605 ++ .../stub/GrpcTransitionRouteGroupsStub.java | 6 + .../cx/v3beta1/stub/GrpcVersionsStub.java | 9 + .../cx/v3beta1/stub/GrpcWebhooksStub.java | 6 + .../cx/v3beta1/stub/TestCasesStub.java | 148 + .../v3beta1/stub/TestCasesStubSettings.java | 868 +++ .../dialogflow/cx/v3/AgentsClientTest.java | 146 + .../cx/v3/EntityTypesClientTest.java | 5 + .../dialogflow/cx/v3/FlowsClientTest.java | 140 + .../dialogflow/cx/v3/MockAgentsImpl.java | 99 +- .../dialogflow/cx/v3/MockEntityTypesImpl.java | 40 +- .../cx/v3/MockEnvironmentsImpl.java | 48 +- .../dialogflow/cx/v3/MockExperimentsImpl.java | 56 +- .../cloud/dialogflow/cx/v3/MockFlowsImpl.java | 85 +- .../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 +- .../cloud/dialogflow/cx/v3/MockTestCases.java | 59 + .../dialogflow/cx/v3/MockTestCasesImpl.java | 293 + .../cx/v3/MockTransitionRouteGroupsImpl.java | 40 +- .../dialogflow/cx/v3/MockVersionsImpl.java | 48 +- .../dialogflow/cx/v3/MockWebhooksImpl.java | 40 +- .../dialogflow/cx/v3/TestCasesClientTest.java | 852 +++ .../cx/v3beta1/AgentsClientTest.java | 146 + .../cx/v3beta1/EntityTypesClientTest.java | 5 + .../cx/v3beta1/FlowsClientTest.java | 140 + .../dialogflow/cx/v3beta1/MockAgentsImpl.java | 99 +- .../cx/v3beta1/MockEntityTypesImpl.java | 40 +- .../cx/v3beta1/MockEnvironmentsImpl.java | 48 +- .../cx/v3beta1/MockExperimentsImpl.java | 56 +- .../dialogflow/cx/v3beta1/MockFlowsImpl.java | 85 +- .../cx/v3beta1/MockIntentsImpl.java | 40 +- .../dialogflow/cx/v3beta1/MockPagesImpl.java | 34 +- .../MockSecuritySettingsServiceImpl.java | 40 +- .../v3beta1/MockSessionEntityTypesImpl.java | 40 +- .../cx/v3beta1/MockSessionsImpl.java | 32 +- .../dialogflow/cx/v3beta1/MockTestCases.java | 59 + .../cx/v3beta1/MockTestCasesImpl.java | 293 + .../MockTransitionRouteGroupsImpl.java | 40 +- .../cx/v3beta1/MockVersionsImpl.java | 48 +- .../cx/v3beta1/MockWebhooksImpl.java | 40 +- .../cx/v3beta1/TestCasesClientTest.java | 852 +++ .../cloud/dialogflow/cx/v3/AgentsGrpc.java | 254 + .../cloud/dialogflow/cx/v3/FlowsGrpc.java | 253 + .../cloud/dialogflow/cx/v3/TestCasesGrpc.java | 1524 +++++ .../dialogflow/cx/v3beta1/AgentsGrpc.java | 256 + .../dialogflow/cx/v3beta1/FlowsGrpc.java | 255 + .../dialogflow/cx/v3beta1/TestCasesGrpc.java | 1544 +++++ .../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 | 1014 +++ .../v3/CalculateCoverageRequestOrBuilder.java | 85 + .../cx/v3/CalculateCoverageResponse.java | 1675 +++++ .../CalculateCoverageResponseOrBuilder.java | 164 + .../dialogflow/cx/v3/ConversationTurn.java | 5653 ++++++++++++++++ .../cx/v3/ConversationTurnOrBuilder.java | 102 + .../cx/v3/CreateTestCaseRequest.java | 959 +++ .../cx/v3/CreateTestCaseRequestOrBuilder.java | 97 + .../cloud/dialogflow/cx/v3/EntityType.java | 100 +- .../dialogflow/cx/v3/EntityTypeOrBuilder.java | 15 + .../dialogflow/cx/v3/EntityTypeProto.java | 130 +- .../cloud/dialogflow/cx/v3/Experiment.java | 531 +- .../dialogflow/cx/v3/ExperimentProto.java | 200 +- .../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 +++ ...AgentValidationResultRequestOrBuilder.java | 83 + .../cx/v3/GetFlowValidationResultRequest.java | 852 +++ ...tFlowValidationResultRequestOrBuilder.java | 83 + .../dialogflow/cx/v3/GetTestCaseRequest.java | 664 ++ .../cx/v3/GetTestCaseRequestOrBuilder.java | 58 + .../cx/v3/ImportTestCasesMetadata.java | 954 +++ .../v3/ImportTestCasesMetadataOrBuilder.java | 77 + .../cx/v3/ImportTestCasesRequest.java | 1063 +++ .../v3/ImportTestCasesRequestOrBuilder.java | 100 + .../cx/v3/ImportTestCasesResponse.java | 764 +++ .../v3/ImportTestCasesResponseOrBuilder.java | 84 + .../google/cloud/dialogflow/cx/v3/Intent.java | 45 +- .../dialogflow/cx/v3/IntentCoverage.java | 1820 ++++++ .../cx/v3/IntentCoverageOrBuilder.java | 90 + .../cx/v3/ListTestCaseResultsRequest.java | 1253 ++++ .../ListTestCaseResultsRequestOrBuilder.java | 160 + .../cx/v3/ListTestCaseResultsResponse.java | 1155 ++++ .../ListTestCaseResultsResponseOrBuilder.java | 104 + .../cx/v3/ListTestCasesRequest.java | 1259 ++++ .../cx/v3/ListTestCasesRequestOrBuilder.java | 121 + .../cx/v3/ListTestCasesResponse.java | 1161 ++++ .../cx/v3/ListTestCasesResponseOrBuilder.java | 109 + .../google/cloud/dialogflow/cx/v3/Page.java | 207 +- .../cloud/dialogflow/cx/v3/PageOrBuilder.java | 45 +- .../cloud/dialogflow/cx/v3/ResourceName.java | 813 +++ .../cx/v3/ResourceNameOrBuilder.java | 75 + .../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 | 838 +++ .../dialogflow/cx/v3/TestCaseResult.java | 1789 ++++++ .../dialogflow/cx/v3/TestCaseResultName.java | 298 + .../cx/v3/TestCaseResultOrBuilder.java | 199 + .../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 | 4423 +++++++++++++ .../cx/v3/TransitionCoverageOrBuilder.java | 97 + .../cx/v3/TransitionRouteGroup.java | 92 - .../cx/v3/TransitionRouteGroupCoverage.java | 3637 +++++++++++ ...TransitionRouteGroupCoverageOrBuilder.java | 105 + .../cx/v3/TransitionRouteGroupOrBuilder.java | 20 - .../cx/v3/UpdateTestCaseRequest.java | 1066 +++ .../cx/v3/UpdateTestCaseRequestOrBuilder.java | 110 + .../cx/v3/ValidateAgentRequest.java | 837 +++ .../cx/v3/ValidateAgentRequestOrBuilder.java | 81 + .../dialogflow/cx/v3/ValidateFlowRequest.java | 844 +++ .../cx/v3/ValidateFlowRequestOrBuilder.java | 83 + .../dialogflow/cx/v3/ValidationMessage.java | 2330 +++++++ .../cx/v3/ValidationMessageOrBuilder.java | 207 + .../cx/v3/ValidationMessageProto.java | 102 + .../cx/v3/VoiceSelectionParams.java | 49 +- .../cx/v3/VoiceSelectionParamsOrBuilder.java | 14 +- .../cloud/dialogflow/cx/v3/WebhookProto.java | 187 +- .../dialogflow/cx/v3/WebhookRequest.java | 1376 +++- .../cx/v3/WebhookRequestOrBuilder.java | 46 + .../google/cloud/dialogflow/cx/v3/agent.proto | 75 +- .../cloud/dialogflow/cx/v3/audio_config.proto | 60 +- .../cloud/dialogflow/cx/v3/entity_type.proto | 8 +- .../cloud/dialogflow/cx/v3/environment.proto | 2 +- .../cloud/dialogflow/cx/v3/experiment.proto | 31 +- .../google/cloud/dialogflow/cx/v3/flow.proto | 73 +- .../cloud/dialogflow/cx/v3/fulfillment.proto | 2 +- .../cloud/dialogflow/cx/v3/intent.proto | 11 +- .../google/cloud/dialogflow/cx/v3/page.proto | 20 +- .../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 | 875 +++ .../cx/v3/transition_route_group.proto | 7 +- .../dialogflow/cx/v3/validation_message.proto | 115 + .../cloud/dialogflow/cx/v3/version.proto | 2 +- .../cloud/dialogflow/cx/v3/webhook.proto | 35 +- .../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 | 1023 +++ .../CalculateCoverageRequestOrBuilder.java | 85 + .../cx/v3beta1/CalculateCoverageResponse.java | 1715 +++++ .../CalculateCoverageResponseOrBuilder.java | 168 + .../cx/v3beta1/ConversationTurn.java | 5697 +++++++++++++++++ .../cx/v3beta1/ConversationTurnOrBuilder.java | 104 + .../cx/v3beta1/CreateAgentRequest.java | 6 +- .../cx/v3beta1/CreateTestCaseRequest.java | 963 +++ .../CreateTestCaseRequestOrBuilder.java | 97 + .../cx/v3beta1/DeleteAgentRequest.java | 6 +- .../dialogflow/cx/v3beta1/EntityType.java | 100 +- .../cx/v3beta1/EntityTypeOrBuilder.java | 15 + .../cx/v3beta1/EntityTypeProto.java | 137 +- .../dialogflow/cx/v3beta1/Experiment.java | 543 +- .../cx/v3beta1/ExperimentProto.java | 210 +- .../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 +++ ...AgentValidationResultRequestOrBuilder.java | 83 + .../GetFlowValidationResultRequest.java | 856 +++ ...tFlowValidationResultRequestOrBuilder.java | 83 + .../cx/v3beta1/GetTestCaseRequest.java | 665 ++ .../v3beta1/GetTestCaseRequestOrBuilder.java | 58 + .../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 +- .../dialogflow/cx/v3beta1/IntentCoverage.java | 1833 ++++++ .../cx/v3beta1/IntentCoverageOrBuilder.java | 91 + .../cx/v3beta1/ListAgentsRequest.java | 6 +- .../cx/v3beta1/ListAgentsResponse.java | 6 +- .../v3beta1/ListTestCaseResultsRequest.java | 1259 ++++ .../ListTestCaseResultsRequestOrBuilder.java | 160 + .../v3beta1/ListTestCaseResultsResponse.java | 1185 ++++ .../ListTestCaseResultsResponseOrBuilder.java | 105 + .../cx/v3beta1/ListTestCasesRequest.java | 1259 ++++ .../ListTestCasesRequestOrBuilder.java | 121 + .../cx/v3beta1/ListTestCasesResponse.java | 1166 ++++ .../ListTestCasesResponseOrBuilder.java | 109 + .../cloud/dialogflow/cx/v3beta1/Page.java | 207 +- .../dialogflow/cx/v3beta1/PageOrBuilder.java | 45 +- .../dialogflow/cx/v3beta1/ResourceName.java | 815 +++ .../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 | 848 +++ .../dialogflow/cx/v3beta1/TestCaseResult.java | 1823 ++++++ .../cx/v3beta1/TestCaseResultName.java | 298 + .../cx/v3beta1/TestCaseResultOrBuilder.java | 205 + .../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 | 4511 +++++++++++++ .../v3beta1/TransitionCoverageOrBuilder.java | 103 + .../cx/v3beta1/TransitionRouteGroup.java | 92 - .../v3beta1/TransitionRouteGroupCoverage.java | 3684 +++++++++++ ...TransitionRouteGroupCoverageOrBuilder.java | 106 + .../TransitionRouteGroupOrBuilder.java | 20 - .../cx/v3beta1/UpdateAgentRequest.java | 6 +- .../cx/v3beta1/UpdateTestCaseRequest.java | 1070 ++++ .../UpdateTestCaseRequestOrBuilder.java | 110 + .../cx/v3beta1/ValidateAgentRequest.java | 837 +++ .../ValidateAgentRequestOrBuilder.java | 81 + .../cx/v3beta1/ValidateFlowRequest.java | 844 +++ .../v3beta1/ValidateFlowRequestOrBuilder.java | 83 + .../cx/v3beta1/ValidationMessage.java | 2346 +++++++ .../v3beta1/ValidationMessageOrBuilder.java | 209 + .../cx/v3beta1/ValidationMessageProto.java | 103 + .../cx/v3beta1/VoiceSelectionParams.java | 14 + .../VoiceSelectionParamsOrBuilder.java | 4 + .../dialogflow/cx/v3beta1/WebhookProto.java | 195 +- .../dialogflow/cx/v3beta1/WebhookRequest.java | 1385 +++- .../cx/v3beta1/WebhookRequestOrBuilder.java | 46 + .../cloud/dialogflow/cx/v3beta1/agent.proto | 145 +- .../dialogflow/cx/v3beta1/audio_config.proto | 5 +- .../dialogflow/cx/v3beta1/entity_type.proto | 8 +- .../dialogflow/cx/v3beta1/environment.proto | 2 +- .../dialogflow/cx/v3beta1/experiment.proto | 31 +- .../cloud/dialogflow/cx/v3beta1/flow.proto | 73 +- .../dialogflow/cx/v3beta1/fulfillment.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/intent.proto | 11 +- .../cloud/dialogflow/cx/v3beta1/page.proto | 20 +- .../cx/v3beta1/response_message.proto | 40 +- .../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 | 875 +++ .../cx/v3beta1/transition_route_group.proto | 7 +- .../cx/v3beta1/validation_message.proto | 115 + .../cloud/dialogflow/cx/v3beta1/version.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/webhook.proto | 35 +- synth.metadata | 206 +- 390 files changed, 160541 insertions(+), 4099 deletions(-) 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 create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java 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 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 create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java 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 create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java create mode 100644 grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.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-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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java 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 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java 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 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 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java 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 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 create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java 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 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/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index fcf763aea..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,11 +777,180 @@ 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(); } + // 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: + * + *

{@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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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. + * + *

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 + */ + 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. + * + *

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 + */ + 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: + * + *

{@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() { + 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/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 4197076d9..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,11 +750,183 @@ 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(); } + // 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: + * + *

{@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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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`. + * @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. + * + *

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`. + * @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. + * + *

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 + */ + 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: + * + *

{@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() { + 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/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java index dfb20ff88..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 @@ -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,24 @@ 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")
+   *           .setIntentView(IntentView.forNumber(0))
+   *           .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 +231,24 @@ 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")
+   *           .setIntentView(IntentView.forNumber(0))
+   *           .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 +260,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 +286,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 +309,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 +331,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 +356,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 +378,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 +406,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 +431,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 +457,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 +480,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 +505,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 +531,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 +554,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 +577,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 +599,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 +623,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 new file mode 100644 index 000000000..87529c157 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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: + * + *

{@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(). + * + *

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. + * + *

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 + */ + 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. + * + *

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 + */ + 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. + * + *

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 + */ + 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: + * + *

{@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() { + return stub.listTestCasesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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. + * + *

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 + */ + public final void batchDeleteTestCases(String parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder().setParent(parent).build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { + batchDeleteTestCasesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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>`. + * @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. + * + *

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>`. + * @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. + * + *

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 + */ + public final TestCase getTestCase(GetTestCaseRequest request) { + return getTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * @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. + * + *

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. + * @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. + * + *

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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + * [`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) { + UpdateTestCaseRequest request = + UpdateTestCaseRequest.newBuilder().setTestCase(testCase).setUpdateMask(updateMask).build(); + return updateTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final TestCase updateTestCase(UpdateTestCaseRequest request) { + return updateTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final OperationFuture runTestCaseAsync( + RunTestCaseRequest request) { + return runTestCaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + return stub.runTestCaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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: + * + *

{@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> + batchRunTestCasesOperationCallable() { + return stub.batchRunTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final CalculateCoverageResponse calculateCoverage(CalculateCoverageRequest request) { + return calculateCoverageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + 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. + * + *

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 + */ + 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: + * + *

{@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> + 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: + * + *

{@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(); + } + + // 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: + * + *

{@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 + */ + 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: + * + *

{@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> + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + * 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. + * + *

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 + * 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. + * + *

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 + */ + 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: + * + *

{@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() { + return stub.listTestCaseResultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + 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/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 bc9b75f67..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,29 @@ * *

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] + * and [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult]. + * + *

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 @@ -90,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/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/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..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 @@ -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()); @@ -302,47 +365,68 @@ 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; + } + @Override public final void close() { shutdown(); 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 6d07ec3dc..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 @@ -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()); @@ -266,38 +328,57 @@ 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; + } + @Override public final void close() { shutdown(); 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/GrpcTestCasesCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java new file mode 100644 index 000000000..a4e62052f --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.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 TestCases service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcTestCasesCallableFactory 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/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..057f08a43 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java @@ -0,0 +1,602 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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) + .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() + .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; + } + + @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; + } + + @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/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/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/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..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,11 +778,180 @@ 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(); } + // 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: + * + *

{@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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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. + * + *

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 + */ + 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. + * + *

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 + */ + 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: + * + *

{@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() { + 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/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 92c81e57f..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,11 +751,183 @@ 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(); } + // 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: + * + *

{@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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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`. + * @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. + * + *

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`. + * @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. + * + *

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 + */ + 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: + * + *

{@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() { + 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/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java index 970168839..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 @@ -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,24 @@ 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")
+   *           .setIntentView(IntentView.forNumber(0))
+   *           .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 +232,24 @@ 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")
+   *           .setIntentView(IntentView.forNumber(0))
+   *           .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 +261,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 +287,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 +310,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 +332,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 +357,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 +379,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 +407,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 +432,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 +458,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 +481,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 +506,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 +532,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 +555,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 +578,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 +600,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 +624,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 new file mode 100644 index 000000000..7f15e1efe --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -0,0 +1,1397 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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: + * + *

{@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(). + * + *

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. + * + *

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 + */ + 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. + * + *

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 + */ + 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. + * + *

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 + */ + 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: + * + *

{@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() { + return stub.listTestCasesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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. + * + *

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 + */ + public final void batchDeleteTestCases(String parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder().setParent(parent).build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { + batchDeleteTestCasesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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>`. + * @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. + * + *

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>`. + * @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. + * + *

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 + */ + public final TestCase getTestCase(GetTestCaseRequest request) { + return getTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * @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. + * + *

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. + * @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. + * + *

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 + */ + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + * [`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) { + UpdateTestCaseRequest request = + UpdateTestCaseRequest.newBuilder().setTestCase(testCase).setUpdateMask(updateMask).build(); + return updateTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final TestCase updateTestCase(UpdateTestCaseRequest request) { + return updateTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final OperationFuture runTestCaseAsync( + RunTestCaseRequest request) { + return runTestCaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + return stub.runTestCaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + 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: + * + *

{@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> + batchRunTestCasesOperationCallable() { + return stub.batchRunTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + */ + public final CalculateCoverageResponse calculateCoverage(CalculateCoverageRequest request) { + return calculateCoverageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + 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. + * + *

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 + */ + 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: + * + *

{@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> + 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: + * + *

{@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(); + } + + // 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: + * + *

{@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 + */ + 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: + * + *

{@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> + 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: + * + *

{@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(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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 + * 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. + * + *

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 + * 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. + * + *

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 + */ + 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: + * + *

{@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() { + return stub.listTestCaseResultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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() { + 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/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 7e0513beb..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,30 @@ * *

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.v3beta1.TestCase] and [Test Case + * Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult]. + * + *

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 @@ -91,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 @@ -98,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/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/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..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 @@ -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()); @@ -304,47 +368,68 @@ 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; + } + @Override public final void close() { shutdown(); 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 5787fa14f..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 @@ -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()); @@ -268,38 +330,57 @@ 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; + } + @Override public final void close() { shutdown(); 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/GrpcTestCasesCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java new file mode 100644 index 000000000..d91edafd9 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.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 TestCases service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcTestCasesCallableFactory 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/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..c168615d1 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java @@ -0,0 +1,605 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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) + .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() + .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; + } + + @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; + } + + @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/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/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/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/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/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..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,56 @@ 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method ValidateAgent, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); + } + } + + @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( + 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 766767054..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,56 @@ 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method ValidateFlow, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); + } + } + + @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( + 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/MockTestCases.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java new file mode 100644 index 000000000..d43a70c7c --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.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 MockTestCases implements MockGrpcService { + private final MockTestCasesImpl serviceImpl; + + public MockTestCases() { + serviceImpl = new MockTestCasesImpl(); + } + + @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/MockTestCasesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java new file mode 100644 index 000000000..7a37fc47f --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java @@ -0,0 +1,293 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.TestCasesGrpc.TestCasesImplBase; +import com.google.longrunning.Operation; +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 MockTestCasesImpl extends TestCasesImplBase { + private List requests; + private Queue responses; + + public MockTestCasesImpl() { + 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 listTestCases( + ListTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTestCasesResponse) { + requests.add(request); + responseObserver.onNext(((ListTestCasesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void batchDeleteTestCases( + BatchDeleteTestCasesRequest 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( + String.format( + "Unrecognized response type %s for method BatchDeleteTestCases, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTestCase(GetTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void createTestCase( + CreateTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void updateTestCase( + UpdateTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method RunTestCase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method BatchRunTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method CalculateCoverage, expected %s or %s", + response.getClass().getName(), + CalculateCoverageResponse.class.getName(), + Exception.class.getName()))); + } + } + + @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)); + } else { + 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()))); + } + } + + @Override + public void exportTestCases( + ExportTestCasesRequest 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( + String.format( + "Unrecognized response type %s for method ExportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTestCaseResults( + ListTestCaseResultsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTestCaseResultsResponse) { + requests.add(request); + responseObserver.onNext(((ListTestCaseResultsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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/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/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/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/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..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,56 @@ 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method ValidateAgent, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); + } + } + + @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( + 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 ab7b52e81..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,56 @@ 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method ValidateFlow, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); + } + } + + @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( + 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/MockTestCases.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java new file mode 100644 index 000000000..f2f175197 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.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 MockTestCases implements MockGrpcService { + private final MockTestCasesImpl serviceImpl; + + public MockTestCases() { + serviceImpl = new MockTestCasesImpl(); + } + + @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/MockTestCasesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java new file mode 100644 index 000000000..da03846d6 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java @@ -0,0 +1,293 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.TestCasesGrpc.TestCasesImplBase; +import com.google.longrunning.Operation; +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 MockTestCasesImpl extends TestCasesImplBase { + private List requests; + private Queue responses; + + public MockTestCasesImpl() { + 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 listTestCases( + ListTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTestCasesResponse) { + requests.add(request); + responseObserver.onNext(((ListTestCasesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void batchDeleteTestCases( + BatchDeleteTestCasesRequest 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( + String.format( + "Unrecognized response type %s for method BatchDeleteTestCases, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTestCase(GetTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void createTestCase( + CreateTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @Override + public void updateTestCase( + UpdateTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestCase) { + requests.add(request); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method RunTestCase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method BatchRunTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @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( + String.format( + "Unrecognized response type %s for method CalculateCoverage, expected %s or %s", + response.getClass().getName(), + CalculateCoverageResponse.class.getName(), + Exception.class.getName()))); + } + } + + @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)); + } else { + 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()))); + } + } + + @Override + public void exportTestCases( + ExportTestCasesRequest 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( + String.format( + "Unrecognized response type %s for method ExportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTestCaseResults( + ListTestCaseResultsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTestCaseResultsResponse) { + requests.add(request); + responseObserver.onNext(((ListTestCaseResultsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + 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/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-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/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/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/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-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..0aae863d9 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java @@ -0,0 +1,1014 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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), + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + TRANSITION_ROUTE_GROUP(3), + 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; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + public static final int TRANSITION_ROUTE_GROUP_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 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; + case 3: + 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 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..a168fbc50 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java @@ -0,0 +1,1675 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + } + 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)) { + 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), + ROUTE_GROUP_COVERAGE(6), + 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 6: + return ROUTE_GROUP_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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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(); + } + + 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 + 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_); + } + if (coverageTypeCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_); + } + 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_); + } + 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; + } + + @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 6: + if (!getRouteGroupCoverage().equals(other.getRouteGroupCoverage())) 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 6: + hash = (37 * hash) + ROUTE_GROUP_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroupCoverage().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(); + } + } + if (coverageTypeCase_ == 6) { + if (routeGroupCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = routeGroupCoverageBuilder_.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 ROUTE_GROUP_COVERAGE: + { + mergeRouteGroupCoverage(other.getRouteGroupCoverage()); + 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder + getTransitionCoverageBuilder() { + return getTransitionCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition (excluding transition route groups) 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 (excluding transition route groups) 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_; + } + + 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); + } + + @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..1c77f73d3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 (excluding transition route groups) coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + boolean hasTransitionCoverage(); + /** + * + * + *
+   * Transition (excluding transition route groups) coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverage(); + /** + * + * + *
+   * 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 new file mode 100644 index 000000000..9910e6062 --- /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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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/CreateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java new file mode 100644 index 000000000..d6be672d9 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} + */ +public final class CreateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + CreateTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTestCaseRequest.newBuilder() to construct. + private CreateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTestCaseRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTestCaseRequest( + 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.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; + } + 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_CreateTestCaseRequest_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_CreateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to create the test case 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 create the test case 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 TEST_CASE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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_; + } + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + 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 (testCase_ != null) { + output.writeMessage(2, getTestCase()); + } + 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 (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTestCase()); + } + 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.CreateTestCaseRequest)) { + return super.equals(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 (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) 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 (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.CreateTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.CreateTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.CreateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.CreateTestCaseRequest 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.CreateTestCaseRequest 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.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase].
+   * 
+ * + * 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.CreateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.CreateTestCaseRequest.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 (testCaseBuilder_ == null) { + testCase_ = null; + } else { + testCase_ = null; + testCaseBuilder_ = 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_CreateTestCaseRequest_descriptor; + } + + @java.lang.Override + 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.CreateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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 (testCaseBuilder_ == null) { + result.testCase_ = testCase_; + } else { + result.testCase_ = testCaseBuilder_.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.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.CreateTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + 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.CreateTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to create the test case 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 create the test case 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 create the test case 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 create the test case 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 create the test case 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 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_; + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .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.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_; + } + + @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.CreateTestCaseRequest) + } + + // @@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.CreateTestCaseRequest(); + } + + 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() { + @java.lang.Override + public CreateTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTestCaseRequest(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.CreateTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..e61aa07ef --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.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 CreateTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create the test case 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.String getParent(); + /** + * + * + *
+   * Required. The agent to create the test case 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. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3.TestCase getTestCase(); + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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..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)) { @@ -641,7 +646,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 +1071,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} @@ -2669,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 @@ -2707,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); } @@ -2740,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; @@ -2763,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; } @@ -2792,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; @@ -2982,6 +3014,8 @@ public Builder clear() { } enableFuzzyExtraction_ = false; + redact_ = false; + return this; } @@ -3033,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; } @@ -3153,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; @@ -4484,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 index 9f2d6f7cc..51366c542 100644 --- 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 @@ -23,7 +23,6 @@ * *
  * Represents an experiment in an environment.
- * Next ID: 13
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} @@ -520,7 +519,6 @@ public interface DefinitionOrBuilder * *
    * Definition of the experiment.
-   * Next ID: 3
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} @@ -969,7 +967,6 @@ protected Builder newBuilderForType( * *
      * Definition of the experiment.
-     * Next ID: 3
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} @@ -1778,7 +1775,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Types of metric for Dialogflow experiment.
+     * Types of ratio-based metric for Dialogflow experiment.
      * 
* * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} @@ -2001,6 +1998,187 @@ private MetricType(int 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) @@ -2925,7 +3103,8 @@ public interface MetricOrBuilder * * *
-       * The type of the metric.
+       * 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; @@ -2937,7 +3116,8 @@ public interface MetricOrBuilder * * *
-       * The type of the metric.
+       * 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; @@ -2946,6 +3126,33 @@ public interface MetricOrBuilder */ 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(); + /** * * @@ -2959,6 +3166,19 @@ public interface MetricOrBuilder */ double getRatio(); + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + double getCount(); + /** * * @@ -3028,6 +3248,7 @@ private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Metric() { type_ = 0; + countType_ = 0; } @java.lang.Override @@ -3089,6 +3310,19 @@ private Metric( confidenceInterval_ = subBuilder.buildPartial(); } + break; + } + case 33: + { + valueCase_ = 4; + value_ = input.readDouble(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + countType_ = rawValue; break; } default: @@ -3134,6 +3368,7 @@ public enum ValueCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RATIO(2), + COUNT(4), VALUE_NOT_SET(0); private final int value; @@ -3154,6 +3389,8 @@ public static ValueCase forNumber(int value) { switch (value) { case 2: return RATIO; + case 4: + return COUNT; case 0: return VALUE_NOT_SET; default: @@ -3176,7 +3413,8 @@ public ValueCase getValueCase() { * * *
-       * The type of the metric.
+       * 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; @@ -3191,7 +3429,8 @@ public int getTypeValue() { * * *
-       * The type of the metric.
+       * 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; @@ -3208,6 +3447,46 @@ public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() : 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; /** * @@ -3228,6 +3507,26 @@ public double getRatio() { 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_; @@ -3314,6 +3613,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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); } @@ -3337,6 +3644,16 @@ public int getSerializedSize() { 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; @@ -3354,6 +3671,7 @@ public boolean equals(final java.lang.Object obj) { (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; @@ -3364,6 +3682,10 @@ public boolean equals(final java.lang.Object obj) { 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: } @@ -3380,6 +3702,8 @@ public int hashCode() { 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(); @@ -3392,6 +3716,13 @@ public int hashCode() { + 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: } @@ -3545,6 +3876,8 @@ public Builder clear() { super.clear(); type_ = 0; + countType_ = 0; + if (confidenceIntervalBuilder_ == null) { confidenceInterval_ = null; } else { @@ -3582,9 +3915,13 @@ 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 { @@ -3647,6 +3984,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result.Met if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + if (other.countType_ != 0) { + setCountTypeValue(other.getCountTypeValue()); + } if (other.hasConfidenceInterval()) { mergeConfidenceInterval(other.getConfidenceInterval()); } @@ -3656,6 +3996,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result.Met setRatio(other.getRatio()); break; } + case COUNT: + { + setCount(other.getCount()); + break; + } case VALUE_NOT_SET: { break; @@ -3711,7 +4056,8 @@ public Builder clearValue() { * * *
-         * The type of the metric.
+         * 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; @@ -3726,7 +4072,8 @@ public int getTypeValue() { * * *
-         * The type of the metric.
+         * 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; @@ -3744,7 +4091,8 @@ public Builder setTypeValue(int value) { * * *
-         * The type of the metric.
+         * 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; @@ -3764,7 +4112,8 @@ public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() * * *
-         * The type of the metric.
+         * 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; @@ -3786,7 +4135,8 @@ public Builder setType( * * *
-         * The type of the metric.
+         * 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; @@ -3800,6 +4150,105 @@ public Builder clearType() { 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; + } + /** * * @@ -3855,6 +4304,61 @@ public Builder clearRatio() { 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< @@ -7627,7 +8131,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Represents an experiment in an environment.
-   * Next ID: 13
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} 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 index d94e541a6..44437e444 100644 --- 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 @@ -112,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "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 " @@ -130,109 +130,115 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "\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\317\001\n\006Metric" + + "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\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" + + ".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\"^\202\323\344\223\002Q\"L/v3/{name=projects/*/locati" + + "ent\"V\202\323\344\223\002I\022G/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" + + "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( @@ -300,7 +306,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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", + "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 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..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,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 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.
      * 
* * 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 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.
      * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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/GetAgentValidationResultRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java new file mode 100644 index 000000000..6c6b9fdf6 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.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/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetAgentValidationResultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.String getName(); + /** + * + * + *
+   * 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. + */ + 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/GetTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java new file mode 100644 index 000000000..a51d9b0fc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetTestCaseRequest} + */ +public final class GetTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) + GetTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTestCaseRequest.newBuilder() to construct. + private GetTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTestCaseRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTestCaseRequest( + 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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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; + } + } + + 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.GetTestCaseRequest)) { + return super.equals(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; + 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.GetTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.GetTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.GetTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.GetTestCaseRequest 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.GetTestCaseRequest 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.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase].
+   * 
+ * + * 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.GetTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.GetTestCaseRequest.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor; + } + + @java.lang.Override + 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.GetTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.GetTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.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.GetTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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; + } + + @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.GetTestCaseRequest) + } + + // @@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.GetTestCaseRequest(); + } + + 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() { + @java.lang.Override + public GetTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTestCaseRequest(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.GetTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..e24c1d761 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.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/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase 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 testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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(); +} 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/ImportTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java new file mode 100644 index 000000000..0225b33ca --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java @@ -0,0 +1,1063 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} + */ +public final class ImportTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + 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.v3.ImportTestCasesRequest)) { + return super.equals(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 (!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.v3.ImportTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ImportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ImportTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.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.v3.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.v3.TestCases.ImportTestCases].
+   * 
+ * + * 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.ImportTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.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.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor; + } + + @java.lang.Override + 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.ImportTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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_; + 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.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.ImportTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.ImportTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.ImportTestCasesRequest) + } + + // @@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.ImportTestCasesRequest(); + } + + 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() { + @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.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..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,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 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.
      * 
* * 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 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.
      * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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 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.
        * 
* * bool redact = 4; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java new file mode 100644 index 000000000..48b982093 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java @@ -0,0 +1,1820 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + +/** + * + * + *
+ * 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.IntentCoverage} + */ +public final class IntentCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.IntentCoverage) + IntentCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntentCoverage.newBuilder() to construct. + private IntentCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntentCoverage() { + intents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntentCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IntentCoverage( + 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)) { + intents_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent>(); + mutable_bitField0_ |= 0x00000001; + } + intents_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.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)) { + intents_ = java.util.Collections.unmodifiableList(intents_); + } + 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_IntentCoverage_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_IntentCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder.class); + } + + public interface IntentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + java.lang.String getIntent(); + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + com.google.protobuf.ByteString getIntentBytes(); + + /** + * + * + *
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
+     * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + boolean getCovered(); + } + /** + * + * + *
+   * The agent's intent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} + */ + public static final class Intent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + IntentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Intent.newBuilder() to construct. + private Intent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Intent() { + intent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Intent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Intent( + 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(); + + intent_ = s; + 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_IntentCoverage_Intent_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_IntentCoverage_Intent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder.class); + } + + public static final int INTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object intent_; + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + @java.lang.Override + 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(); + intent_ = s; + return s; + } + } + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + @java.lang.Override + 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); + intent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; + /** + * + * + *
+     * Whether or not the intent 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 (!getIntentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intent_); + } + 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 (!getIntentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, intent_); + } + 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.IntentCoverage.Intent)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent other = + (com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) obj; + + if (!getIntent().equals(other.getIntent())) 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(); + 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.IntentCoverage.Intent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.IntentCoverage.Intent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.IntentCoverage.Intent 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.IntentCoverage.Intent 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 agent's intent.
+     * 
+ * + * 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.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.IntentCoverage.Intent.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(); + intent_ = ""; + + 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_IntentCoverage_Intent_descriptor; + } + + @java.lang.Override + 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.IntentCoverage.Intent build() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.IntentCoverage.Intent other) { + if (other == com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()) + return this; + if (!other.getIntent().isEmpty()) { + intent_ = other.intent_; + onChanged(); + } + 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.IntentCoverage.Intent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object intent_ = ""; + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + 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(); + intent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + 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); + intent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The intent to set. + * @return This builder for chaining. + */ + public Builder setIntent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + intent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearIntent() { + + intent_ = getDefaultInstance().getIntent(); + onChanged(); + return this; + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for intent to set. + * @return This builder for chaining. + */ + public Builder setIntentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + intent_ = value; + onChanged(); + return this; + } + + private boolean covered_; + /** + * + * + *
+       * Whether or not the intent 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 intent 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 intent 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.IntentCoverage.Intent) + } + + // @@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.IntentCoverage.Intent(); + } + + 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() { + @java.lang.Override + public Intent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Intent(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.IntentCoverage.Intent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int INTENTS_FIELD_NUMBER = 1; + private java.util.List intents_; + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public java.util.List getIntentsList() { + return intents_; + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public java.util.List + getIntentsOrBuilderList() { + return intents_; + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public int getIntentsCount() { + return intents_.size(); + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( + int 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; + + @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 < intents_.size(); i++) { + output.writeMessage(1, intents_.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 < 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; + 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.IntentCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.IntentCoverage other = + (com.google.cloud.dialogflow.cx.v3.IntentCoverage) obj; + + 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; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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.IntentCoverage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.IntentCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.IntentCoverage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.IntentCoverage 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.IntentCoverage 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; + } + /** + * + * + *
+   * 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.IntentCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.IntentCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIntentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + intentsBuilder_.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_IntentCoverage_descriptor; + } + + @java.lang.Override + 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.IntentCoverage build() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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 (intentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + intents_ = java.util.Collections.unmodifiableList(intents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.intents_ = intents_; + } else { + result.intents_ = intentsBuilder_.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.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.IntentCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance()) + return this; + if (intentsBuilder_ == null) { + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); + } + onChanged(); + } + } else { + if (!other.intents_.isEmpty()) { + if (intentsBuilder_.isEmpty()) { + intentsBuilder_.dispose(); + intentsBuilder_ = null; + intents_ = other.intents_; + bitField0_ = (bitField0_ & ~0x00000001); + intentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIntentsFieldBuilder() + : null; + } else { + intentsBuilder_.addAllMessages(other.intents_); + } + } + } + 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.IntentCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.IntentCoverage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List intents_ = + java.util.Collections.emptyList(); + + private void ensureIntentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + intents_ = + new java.util.ArrayList( + intents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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_; + + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public java.util.List + getIntentsList() { + if (intentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intents_); + } else { + return intentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public int getIntentsCount() { + if (intentsBuilder_ == null) { + return intents_.size(); + } else { + return intentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getIntents(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); + } else { + return intentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder setIntents( + int index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.set(index, value); + onChanged(); + } else { + intentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder setIntents( + int index, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.set(index, builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents(com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(value); + onChanged(); + } else { + intentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + int index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(index, value); + onChanged(); + } else { + intentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + int index, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(index, builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder addAllIntents( + java.lang.Iterable + values) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); + onChanged(); + } else { + intentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder clearIntents() { + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + intentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public Builder removeIntents(int index) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.remove(index); + onChanged(); + } else { + intentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder getIntentsBuilder( + int index) { + return getIntentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( + int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); + } else { + return intentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder> + getIntentsOrBuilderList() { + if (intentsBuilder_ != null) { + return intentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intents_); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder addIntentsBuilder() { + return getIntentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder addIntentsBuilder( + int index) { + return getIntentsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + public java.util.List + getIntentsBuilderList() { + return getIntentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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.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 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 + 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.IntentCoverage) + } + + // @@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.IntentCoverage(); + } + + 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() { + @java.lang.Override + public IntentCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IntentCoverage(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.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/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/ListTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..2b0ac31d1 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 ListTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.String getParent(); + /** + * + * + *
+   * 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. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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. + */ + 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(); + + /** + * + * + *
+   * 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..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 @@ -524,9 +524,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -547,9 +554,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -570,9 +584,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -592,9 +613,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -614,9 +642,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2143,9 +2178,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2169,9 +2211,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2194,9 +2243,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2219,9 +2275,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2251,9 +2314,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2280,9 +2350,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2311,9 +2388,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2343,9 +2427,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2372,9 +2463,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2401,9 +2499,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2430,9 +2535,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2458,9 +2570,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2486,9 +2605,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2508,9 +2634,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2534,9 +2667,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2560,9 +2700,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2582,9 +2729,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2606,9 +2760,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * 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..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 @@ -252,9 +252,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -271,9 +278,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -290,9 +304,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -309,9 +330,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -329,9 +357,16 @@ 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 + * [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + * condition specified. * * * 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/ResourceName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java new file mode 100644 index 000000000..5e5edf0fa --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java @@ -0,0 +1,813 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + +/** + * + * + *
+ * Resource name and display name.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResourceName} + */ +public final class ResourceName extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResourceName) + ResourceNameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceName.newBuilder() to construct. + private ResourceName(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceName() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceName(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceName( + 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(); + + displayName_ = 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.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.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name.
+   * 
+ * + * 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_; + /** + * + * + *
+   * 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 + 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_); + } + 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_); + } + 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.ResourceName)) { + return super.equals(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; + } + + @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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + 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.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.ResourceName parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ResourceName parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ResourceName 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.ResourceName 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; + } + /** + * + * + *
+   * Resource name and display name.
+   * 
+ * + * 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.ResourceName) + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ResourceName.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_ = ""; + + displayName_ = ""; + + 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_ResourceName_descriptor; + } + + @java.lang.Override + 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.ResourceName build() { + com.google.cloud.dialogflow.cx.v3.ResourceName result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ResourceName parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.ResourceName) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * 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); + } + + @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.ResourceName) + } + + // @@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.ResourceName(); + } + + 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() { + @java.lang.Override + public ResourceName parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceName(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.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/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..aa2b1d5f5 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java @@ -0,0 +1,838 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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_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 + 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/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( + 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.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.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_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, + 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(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, + new java.lang.String[] { + "Agent", "Type", + }); + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor = + 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", "RouteGroupCoverage", "CoverageType", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "TestCases", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "TestCase", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "TestCase", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Name", "Environment", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor = + 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, + new java.lang.String[] { + "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor = + 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(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, + new java.lang.String[] { + "Parent", "Environment", "TestCases", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "Results", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor = + 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, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor = + 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, + new java.lang.String[] { + "TestCase", "Status", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "GcsUri", "Content", "Source", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor = + 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, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor = + 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, + new java.lang.String[] { + "TestCase", "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "GcsUri", "DataFormat", "Filter", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "GcsUri", "Content", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor = + 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(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, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor = + 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, + 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.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.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..ac4cc3476 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java @@ -0,0 +1,1789 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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_; + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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_ = ""; + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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/TestCaseResultName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java new file mode 100644 index 000000000..73fa9cd3e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.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 TestCaseResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE_RESULT = + PathTemplate.createWithoutUrlEncoding( + "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 testCase; + private final String result; + + @Deprecated + protected TestCaseResultName() { + project = null; + location = null; + agent = null; + testCase = null; + result = null; + } + + private TestCaseResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + result = Preconditions.checkNotNull(builder.getResult()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public String getResult() { + return result; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TestCaseResultName of( + String project, String location, String agent, String testCase, String result) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .setResult(result) + .build(); + } + + public static String format( + String project, String location, String agent, String testCase, String result) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .setResult(result) + .build() + .toString(); + } + + public static TestCaseResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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("test_case"), + matchMap.get("result")); + } + + 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 (TestCaseResultName 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_RESULT.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); + } + if (result != null) { + fieldMapBuilder.put("result", result); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "test_case", + testCase, + "result", + result); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + 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.testCase, that.testCase) + && Objects.equals(this.result, that.result); + } + 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); + h *= 1000003; + h ^= Objects.hashCode(result); + return h; + } + + /** + * Builder for + * 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 testCase; + private String result; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public String getResult() { + return result; + } + + 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; + } + + public Builder setResult(String result) { + this.result = result; + return this; + } + + private Builder(TestCaseResultName testCaseResultName) { + project = testCaseResultName.project; + location = testCaseResultName.location; + agent = testCaseResultName.agent; + testCase = testCaseResultName.testCase; + result = testCaseResultName.result; + } + + 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..d54fa7f7d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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(); + + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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..a208c9fa6 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java @@ -0,0 +1,4423 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 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} + */ +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 a page.
+   * 
+ * + * 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 a page.
+     * 
+ * + * 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 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} + */ + 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/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/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/UpdateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java new file mode 100644 index 000000000..3513b4ebc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java @@ -0,0 +1,1066 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} + */ +public final class UpdateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + UpdateTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTestCaseRequest.newBuilder() to construct. + private UpdateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTestCaseRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTestCaseRequest( + 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.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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_; + } + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] cannot be updated.
+   * 
+ * + * .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 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]; + * + * + * @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 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]; + * + */ + @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 (testCase_ != null) { + output.writeMessage(1, getTestCase()); + } + 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 (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); + } + 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.UpdateTestCaseRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) obj; + + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) 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 (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().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.UpdateTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.UpdateTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.UpdateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.UpdateTestCaseRequest 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.UpdateTestCaseRequest 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.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase].
+   * 
+ * + * 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.UpdateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.UpdateTestCaseRequest.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 (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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor; + } + + @java.lang.Override + 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.UpdateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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.testCase_ = testCaseBuilder_.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.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.UpdateTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.getDefaultInstance()) + return this; + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + 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.UpdateTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) 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_; + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .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.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.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 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]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] cannot be updated.
+     * 
+ * + * .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 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]; + * + */ + 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 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]; + * + */ + 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 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]; + * + */ + 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 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]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] cannot be updated.
+     * 
+ * + * .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 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]; + * + */ + 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 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]; + * + */ + 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.UpdateTestCaseRequest) + } + + // @@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.UpdateTestCaseRequest(); + } + + 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() { + @java.lang.Override + public UpdateTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTestCaseRequest(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.UpdateTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 000000000..41e758392 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 UpdateTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3.TestCase getTestCase(); + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder(); + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * 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]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * 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]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java new file mode 100644 index 000000000..9898950ee --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java @@ -0,0 +1,837 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateAgentRequest} + */ +public final class ValidateAgentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) + ValidateAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateAgentRequest.newBuilder() to construct. + private ValidateAgentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateAgentRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateAgentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateAgentRequest( + 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_ValidateAgentRequest_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_ValidateAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 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.ValidateAgentRequest)) { + return super.equals(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; + } + + @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.ValidateAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateAgentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ValidateAgentRequest 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.ValidateAgentRequest 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.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent].
+   * 
+ * + * 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.ValidateAgentRequest) + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ValidateAgentRequest.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_ValidateAgentRequest_descriptor; + } + + @java.lang.Override + 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.ValidateAgentRequest build() { + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ValidateAgentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 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.ValidateAgentRequest) + } + + // @@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.ValidateAgentRequest(); + } + + 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() { + @java.lang.Override + public ValidateAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateAgentRequest(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.ValidateAgentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java new file mode 100644 index 000000000..bb983843f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.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. + */ +// 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 ValidateAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * 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/ValidateFlowRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java new file mode 100644 index 000000000..f4d637ea0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java @@ -0,0 +1,844 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateFlowRequest} + */ +public final class ValidateFlowRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + ValidateFlowRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateFlowRequest.newBuilder() to construct. + private ValidateFlowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateFlowRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateFlowRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateFlowRequest( + 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_ValidateFlowRequest_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_ValidateFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow 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 flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow 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 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.ValidateFlowRequest)) { + return super.equals(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; + } + + @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.ValidateFlowRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateFlowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateFlowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ValidateFlowRequest 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.ValidateFlowRequest 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.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].
+   * 
+ * + * 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.ValidateFlowRequest) + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ValidateFlowRequest.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_ValidateFlowRequest_descriptor; + } + + @java.lang.Override + 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.ValidateFlowRequest build() { + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ValidateFlowRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 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.ValidateFlowRequest) + } + + // @@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.ValidateFlowRequest(); + } + + 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() { + @java.lang.Override + public ValidateFlowRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateFlowRequest(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.ValidateFlowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java new file mode 100644 index 000000000..41aaa4a91 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.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 ValidateFlowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * + * 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/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/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..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\"\371\006\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,85 +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\221\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\234\001\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" + + "ct\022h\n\031sentiment_analysis_result\030\t \001(\0132E." + + "google.cloud.dialogflow.cx.v3.WebhookReq" + + "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( @@ -353,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 @@ -372,7 +386,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 @@ -394,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 = @@ -470,6 +494,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/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..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: @@ -917,6 +936,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 +1050,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 +1086,7 @@ private IntentInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private IntentInfo() { lastMatchedIntent_ = ""; + displayName_ = ""; } @java.lang.Override @@ -1086,6 +1145,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 +2274,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 +2473,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 +2511,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 +2544,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 +2567,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 +2584,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 +2762,11 @@ public Builder clear() { super.clear(); lastMatchedIntent_ = ""; + displayName_ = ""; + internalGetMutableParameters().clear(); + confidence_ = 0F; + return this; } @@ -2635,8 +2797,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 +2858,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 +3015,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 +3348,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) { @@ -3124,32 +3456,727 @@ 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_; + 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 detectIntentResponseId. + * Protobuf type {@code google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} */ - @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 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); } - } + + private SentimentAnalysisResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SentimentAnalysisResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + 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; + } + } /** * * @@ -3501,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 @@ -3536,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); } @@ -3566,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; @@ -3604,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; } @@ -3641,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; @@ -3826,6 +4929,12 @@ public Builder clear() { payload_ = null; payloadBuilder_ = null; } + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } return this; } @@ -3889,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; } @@ -3985,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; @@ -5465,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/agent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 9cc1ac66d..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. @@ -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..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. @@ -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..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. @@ -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 @@ -205,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/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 92f48189b..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. @@ -104,7 +104,6 @@ service Experiments { } // Represents an experiment in an environment. -// Next ID: 13 message Experiment { option (google.api.resource) = { type: "dialogflow.googleapis.com/Experiment" @@ -112,7 +111,6 @@ message 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. @@ -151,13 +149,21 @@ message Experiment { // Metric and corresponding confidence intervals. message Metric { - // The type of the 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 @@ -182,7 +188,7 @@ message Experiment { int32 session_count = 3; } - // Types of metric for Dialogflow experiment. + // Types of ratio-based metric for Dialogflow experiment. enum MetricType { // Metric unspecified. METRIC_UNSPECIFIED = 0; @@ -204,6 +210,21 @@ message Experiment { 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; 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..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. @@ -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/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 3b97d5e2c..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. @@ -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 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. 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..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. @@ -147,9 +147,16 @@ 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 + // [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + // specified. // * TransitionRoutes defined in the page with only condition specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + // condition specified. repeated TransitionRoute transition_routes = 9; // Handlers associated with the page to handle events such as webhook errors, @@ -238,9 +245,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 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. 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..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 new file mode 100644 index 000000000..baa1aff62 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -0,0 +1,875 @@ +// 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.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/cloud/dialogflow/cx/v3/transition_route_group.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/{name=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; + + // Environment where the test was run. If not set, it indicates the draft + // 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. + 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 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 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 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 { + // 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 a page. + 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; +} + +// 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 { + // 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; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; + } + + // 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 (excluding transition route groups) coverage. + TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; + } +} + +// 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. 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]; +} + +// 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..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. @@ -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..f36c9bb9d --- /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 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.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/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 4c7af2bc5..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. @@ -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 { @@ -255,11 +259,30 @@ 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; + } + + // 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 @@ -286,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. @@ -424,9 +451,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/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..83a97fd81 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java @@ -0,0 +1,1023 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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), + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + TRANSITION_ROUTE_GROUP(3), + 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; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + public static final int TRANSITION_ROUTE_GROUP_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 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; + case 3: + 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 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..24fba4b71 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java @@ -0,0 +1,1715 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + } + 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)) { + 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), + ROUTE_GROUP_COVERAGE(6), + 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 6: + return ROUTE_GROUP_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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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(); + } + + 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 + 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_); + } + if (coverageTypeCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_); + } + 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_); + } + 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; + } + + @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 6: + if (!getRouteGroupCoverage().equals(other.getRouteGroupCoverage())) 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 6: + hash = (37 * hash) + ROUTE_GROUP_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroupCoverage().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(); + } + } + if (coverageTypeCase_ == 6) { + if (routeGroupCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = routeGroupCoverageBuilder_.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 ROUTE_GROUP_COVERAGE: + { + mergeRouteGroupCoverage(other.getRouteGroupCoverage()); + 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) 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 (excluding transition route groups) coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder + getTransitionCoverageBuilder() { + return getTransitionCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition (excluding transition route groups) 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 (excluding transition route groups) 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_; + } + + 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); + } + + @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..f0bd9e0cd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 (excluding transition route groups) coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + boolean hasTransitionCoverage(); + /** + * + * + *
+   * Transition (excluding transition route groups) coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCoverage(); + /** + * + * + *
+   * Transition (excluding transition route groups) coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + 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 new file mode 100644 index 000000000..72bee9ddd --- /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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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/CreateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java new file mode 100644 index 000000000..e6eee1328 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.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; + +/** + * + * + *
+ * The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} + */ +public final class CreateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + CreateTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTestCaseRequest.newBuilder() to construct. + private CreateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTestCaseRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTestCaseRequest( + 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.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; + } + 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_CreateTestCaseRequest_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_CreateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to create the test case 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 create the test case 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 TEST_CASE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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_; + } + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + 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 (testCase_ != null) { + output.writeMessage(2, getTestCase()); + } + 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 (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTestCase()); + } + 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.CreateTestCaseRequest)) { + return super.equals(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 (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) 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 (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.CreateTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.CreateTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.CreateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.CreateTestCaseRequest 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.CreateTestCaseRequest 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.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase].
+   * 
+ * + * 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.CreateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.CreateTestCaseRequest.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 (testCaseBuilder_ == null) { + testCase_ = null; + } else { + testCase_ = null; + testCaseBuilder_ = 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_CreateTestCaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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 (testCaseBuilder_ == null) { + result.testCase_ = testCase_; + } else { + result.testCase_ = testCaseBuilder_.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.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.CreateTestCaseRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + 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.CreateTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to create the test case 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 create the test case 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 create the test case 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 create the test case 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 create the test case 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 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_; + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + } + /** + * + * + *
+     * Required. The test case to create.
+     * 
+ * + * + * .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.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_; + } + + @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.CreateTestCaseRequest) + } + + // @@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.CreateTestCaseRequest(); + } + + 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() { + @java.lang.Override + public CreateTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTestCaseRequest(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.CreateTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..426048af2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.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/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreateTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create the test case 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.String getParent(); + /** + * + * + *
+   * Required. The agent to create the test case 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. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase(); + /** + * + * + *
+   * Required. The test case to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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..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)) { @@ -646,7 +651,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 +1076,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} @@ -2692,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 @@ -2731,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); } @@ -2765,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; @@ -2788,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; } @@ -2817,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; @@ -3007,6 +3039,8 @@ public Builder clear() { } enableFuzzyExtraction_ = false; + redact_ = false; + return this; } @@ -3058,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; } @@ -3179,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; @@ -4545,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 index 7ff72ae15..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 @@ -23,7 +23,6 @@ * *
  * Represents an experiment in an environment.
- * Next ID: 13
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} @@ -525,7 +524,6 @@ public interface DefinitionOrBuilder * *
    * Definition of the experiment.
-   * Next ID: 3
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} @@ -975,7 +973,6 @@ protected Builder newBuilderForType( * *
      * Definition of the experiment.
-     * Next ID: 3
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} @@ -1797,7 +1794,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Types of metric for Dialogflow experiment.
+     * Types of ratio-based metric for Dialogflow experiment.
      * 
* * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType} @@ -2020,6 +2017,187 @@ private MetricType(int 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) @@ -2949,7 +3127,8 @@ public interface MetricOrBuilder * * *
-       * The type of the metric.
+       * 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; @@ -2961,7 +3140,8 @@ public interface MetricOrBuilder * * *
-       * The type of the metric.
+       * 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; @@ -2970,6 +3150,35 @@ public interface MetricOrBuilder */ 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(); + /** * * @@ -2983,6 +3192,19 @@ public interface MetricOrBuilder */ double getRatio(); + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + double getCount(); + /** * * @@ -3053,6 +3275,7 @@ private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Metric() { type_ = 0; + countType_ = 0; } @java.lang.Override @@ -3115,6 +3338,19 @@ private Metric( confidenceInterval_ = subBuilder.buildPartial(); } + break; + } + case 33: + { + valueCase_ = 4; + value_ = input.readDouble(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + countType_ = rawValue; break; } default: @@ -3160,6 +3396,7 @@ public enum ValueCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RATIO(2), + COUNT(4), VALUE_NOT_SET(0); private final int value; @@ -3180,6 +3417,8 @@ public static ValueCase forNumber(int value) { switch (value) { case 2: return RATIO; + case 4: + return COUNT; case 0: return VALUE_NOT_SET; default: @@ -3202,7 +3441,8 @@ public ValueCase getValueCase() { * * *
-       * The type of the metric.
+       * 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; @@ -3217,7 +3457,8 @@ public int getTypeValue() { * * *
-       * The type of the metric.
+       * 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; @@ -3234,6 +3475,48 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getTy : 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; /** * @@ -3254,6 +3537,26 @@ public double getRatio() { 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_; @@ -3341,6 +3644,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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); } @@ -3365,6 +3677,17 @@ public int getSerializedSize() { 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; @@ -3382,6 +3705,7 @@ public boolean equals(final java.lang.Object obj) { (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; @@ -3392,6 +3716,10 @@ public boolean equals(final java.lang.Object obj) { 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: } @@ -3408,6 +3736,8 @@ public int hashCode() { 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(); @@ -3420,6 +3750,13 @@ public int hashCode() { + 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: } @@ -3576,6 +3913,8 @@ public Builder clear() { super.clear(); type_ = 0; + countType_ = 0; + if (confidenceIntervalBuilder_ == null) { confidenceInterval_ = null; } else { @@ -3614,9 +3953,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric buildPart 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 { @@ -3681,6 +4024,9 @@ public Builder mergeFrom( if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + if (other.countType_ != 0) { + setCountTypeValue(other.getCountTypeValue()); + } if (other.hasConfidenceInterval()) { mergeConfidenceInterval(other.getConfidenceInterval()); } @@ -3690,6 +4036,11 @@ public Builder mergeFrom( setRatio(other.getRatio()); break; } + case COUNT: + { + setCount(other.getCount()); + break; + } case VALUE_NOT_SET: { break; @@ -3745,7 +4096,8 @@ public Builder clearValue() { * * *
-         * The type of the metric.
+         * 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; @@ -3760,7 +4112,8 @@ public int getTypeValue() { * * *
-         * The type of the metric.
+         * 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; @@ -3778,7 +4131,8 @@ public Builder setTypeValue(int value) { * * *
-         * The type of the metric.
+         * 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; @@ -3798,7 +4152,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getTy * * *
-         * The type of the metric.
+         * 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; @@ -3820,7 +4175,8 @@ public Builder setType( * * *
-         * The type of the metric.
+         * 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; @@ -3834,6 +4190,111 @@ public Builder clearType() { 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; + } + /** * * @@ -3889,6 +4350,61 @@ public Builder clearRatio() { 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< @@ -7709,7 +8225,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Represents an experiment in an environment.
-   * Next ID: 13
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} 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 index 2df16da30..c6494b939 100644 --- 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 @@ -112,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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(" + + "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" @@ -131,113 +131,119 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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" + + "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\331\001\n\006Metric" + + "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" - + "\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" + + "\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( @@ -309,7 +315,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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", + "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 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..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,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 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.
      * 
* * 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 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.
      * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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/GetAgentValidationResultRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java new file mode 100644 index 000000000..229ac9a69 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.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/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetAgentValidationResultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.String getName(); + /** + * + * + *
+   * 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. + */ + 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/GetTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java new file mode 100644 index 000000000..3e7c132de --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.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/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} + */ +public final class GetTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + GetTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTestCaseRequest.newBuilder() to construct. + private GetTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTestCaseRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTestCaseRequest( + 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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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; + } + } + + 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.GetTestCaseRequest)) { + return super.equals(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; + 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.GetTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.GetTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.GetTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.GetTestCaseRequest 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.GetTestCaseRequest 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.GetTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCase].
+   * 
+ * + * 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.GetTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.GetTestCaseRequest.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor; + } + + @java.lang.Override + 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.GetTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.GetTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.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.GetTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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. The name of the testcase.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/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; + } + + @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.GetTestCaseRequest) + } + + // @@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.GetTestCaseRequest(); + } + + 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() { + @java.lang.Override + public GetTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTestCaseRequest(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.GetTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..ba9878069 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.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/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase 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 testcase.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/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(); +} 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..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,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 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.
      * 
* * 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 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.
      * 
* * 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 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.
        * 
* * 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 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.
        * 
* * 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 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.
        * 
* * bool redact = 4; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java new file mode 100644 index 000000000..8f611bae1 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java @@ -0,0 +1,1833 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + +/** + * + * + *
+ * 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.IntentCoverage} + */ +public final class IntentCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + IntentCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntentCoverage.newBuilder() to construct. + private IntentCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntentCoverage() { + intents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntentCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IntentCoverage( + 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)) { + intents_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent>(); + mutable_bitField0_ |= 0x00000001; + } + intents_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.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)) { + intents_ = java.util.Collections.unmodifiableList(intents_); + } + 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_IntentCoverage_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_IntentCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder.class); + } + + public interface IntentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + java.lang.String getIntent(); + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + com.google.protobuf.ByteString getIntentBytes(); + + /** + * + * + *
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
+     * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + boolean getCovered(); + } + /** + * + * + *
+   * The agent's intent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} + */ + public static final class Intent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + IntentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Intent.newBuilder() to construct. + private Intent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Intent() { + intent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Intent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Intent( + 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(); + + intent_ = s; + 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_IntentCoverage_Intent_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_IntentCoverage_Intent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder.class); + } + + public static final int INTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object intent_; + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + @java.lang.Override + 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(); + intent_ = s; + return s; + } + } + /** + * + * + *
+     * The intent full resource name
+     * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + @java.lang.Override + 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); + intent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; + /** + * + * + *
+     * Whether or not the intent 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 (!getIntentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intent_); + } + 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 (!getIntentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, intent_); + } + 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.IntentCoverage.Intent)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent other = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) obj; + + if (!getIntent().equals(other.getIntent())) 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(); + 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.IntentCoverage.Intent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.IntentCoverage.Intent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.IntentCoverage.Intent 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.IntentCoverage.Intent 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 agent's intent.
+     * 
+ * + * 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.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.IntentCoverage.Intent.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(); + intent_ = ""; + + 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_IntentCoverage_Intent_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance(); + } + + @java.lang.Override + 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); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.IntentCoverage.Intent other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()) + return this; + if (!other.getIntent().isEmpty()) { + intent_ = other.intent_; + onChanged(); + } + 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.IntentCoverage.Intent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object intent_ = ""; + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The intent. + */ + 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(); + intent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for intent. + */ + 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); + intent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The intent to set. + * @return This builder for chaining. + */ + public Builder setIntent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + intent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearIntent() { + + intent_ = getDefaultInstance().getIntent(); + onChanged(); + return this; + } + /** + * + * + *
+       * The intent full resource name
+       * 
+ * + * string intent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for intent to set. + * @return This builder for chaining. + */ + public Builder setIntentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + intent_ = value; + onChanged(); + return this; + } + + private boolean covered_; + /** + * + * + *
+       * Whether or not the intent 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 intent 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 intent 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.IntentCoverage.Intent) + } + + // @@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.IntentCoverage.Intent(); + } + + 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() { + @java.lang.Override + public Intent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Intent(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.IntentCoverage.Intent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int INTENTS_FIELD_NUMBER = 1; + private java.util.List intents_; + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public java.util.List + getIntentsList() { + return intents_; + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public java.util.List< + ? 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(); + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + 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_; + /** + * + * + *
+   * 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; + + @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 < intents_.size(); i++) { + output.writeMessage(1, intents_.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 < 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; + 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.IntentCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage other = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) obj; + + 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; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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.IntentCoverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.IntentCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.IntentCoverage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.IntentCoverage 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.IntentCoverage 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; + } + /** + * + * + *
+   * 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.IntentCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.IntentCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIntentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + intentsBuilder_.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_IntentCoverage_descriptor; + } + + @java.lang.Override + 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.IntentCoverage build() { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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 (intentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + intents_ = java.util.Collections.unmodifiableList(intents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.intents_ = intents_; + } else { + result.intents_ = intentsBuilder_.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.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.IntentCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance()) + return this; + if (intentsBuilder_ == null) { + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); + } + onChanged(); + } + } else { + if (!other.intents_.isEmpty()) { + if (intentsBuilder_.isEmpty()) { + intentsBuilder_.dispose(); + intentsBuilder_ = null; + intents_ = other.intents_; + bitField0_ = (bitField0_ & ~0x00000001); + intentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIntentsFieldBuilder() + : null; + } else { + intentsBuilder_.addAllMessages(other.intents_); + } + } + } + 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.IntentCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List intents_ = + java.util.Collections.emptyList(); + + private void ensureIntentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + intents_ = + new java.util.ArrayList( + intents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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_; + + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public java.util.List + getIntentsList() { + if (intentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intents_); + } else { + return intentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public int getIntentsCount() { + if (intentsBuilder_ == null) { + return intents_.size(); + } else { + return intentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getIntents(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); + } else { + return intentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder setIntents( + int index, com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.set(index, value); + onChanged(); + } else { + intentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder setIntents( + int index, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.set(index, builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents(com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(value); + onChanged(); + } else { + intentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + int index, com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(index, value); + onChanged(); + } else { + intentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder addIntents( + int index, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(index, builderForValue.build()); + onChanged(); + } else { + intentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder addAllIntents( + java.lang.Iterable + values) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); + onChanged(); + } else { + intentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder clearIntents() { + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + intentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public Builder removeIntents(int index) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.remove(index); + onChanged(); + } else { + intentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder getIntentsBuilder( + int index) { + return getIntentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder + getIntentsOrBuilder(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); + } else { + return intentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder> + getIntentsOrBuilderList() { + if (intentsBuilder_ != null) { + return intentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intents_); + } + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder + addIntentsBuilder() { + return getIntentsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder addIntentsBuilder( + int index) { + return getIntentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Intents present in the agent
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + public java.util.List + getIntentsBuilderList() { + return getIntentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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.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 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 + 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.IntentCoverage) + } + + // @@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.IntentCoverage(); + } + + 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() { + @java.lang.Override + public IntentCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IntentCoverage(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.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/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/ListTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java new file mode 100644 index 000000000..a32d49887 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/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/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} + */ +public final class ListTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + 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.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 + 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.v3beta1.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.v3beta1.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.v3beta1.ListTestCasesRequest)) { + return super.equals(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; + } + + @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.v3beta1.ListTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ListTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ListTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.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.v3beta1.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.v3beta1.TestCases.ListTestCases].
+   * 
+ * + * 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.ListTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.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.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor; + } + + @java.lang.Override + 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.ListTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.ListTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.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.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); + } + + @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.ListTestCasesRequest) + } + + // @@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.ListTestCasesRequest(); + } + + 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() { + @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.v3beta1.ListTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..4b9ce65a7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 ListTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.String getParent(); + /** + * + * + *
+   * 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. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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. + */ + 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(); + + /** + * + * + *
+   * 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/ListTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java new file mode 100644 index 000000000..1b2ad224b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} + */ +public final class ListTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + @java.lang.Override + 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; + 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.v3beta1.ListTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ListTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ListTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.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.v3beta1.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.v3beta1.TestCases.ListTestCases].
+   * 
+ * + * 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.ListTestCasesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.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.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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 (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.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.ListTestCasesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public Builder setTestCases(int index, com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + 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 { + 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.v3beta1.TestCase test_cases = 1; + */ + public Builder addTestCases(com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public Builder addTestCases(int index, com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public Builder addTestCases( + com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + 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 { + 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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder addTestCasesBuilder() { + return getTestCasesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase test_cases = 1; + */ + 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 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; + */ + public java.util.List + getTestCasesBuilderList() { + return getTestCasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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.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 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.v3beta1.ListTestCasesResponse) + } + + // @@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.ListTestCasesResponse(); + } + + 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() { + @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.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..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 @@ -528,9 +528,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -552,9 +559,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -576,9 +590,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -599,9 +620,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -622,9 +650,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2159,9 +2194,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2186,9 +2228,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2212,9 +2261,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2238,9 +2294,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2271,9 +2334,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2301,9 +2371,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2334,9 +2411,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2367,9 +2451,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2397,9 +2488,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2427,9 +2525,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2458,9 +2563,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2487,9 +2599,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2516,9 +2635,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2539,9 +2665,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2566,9 +2699,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2593,9 +2733,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2617,9 +2764,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2642,9 +2796,16 @@ 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 + * [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 + * 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..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 @@ -252,9 +252,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -272,9 +279,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -292,9 +306,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -312,9 +333,16 @@ 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 + * [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 + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -333,9 +361,16 @@ 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 + * [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 + * 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/ResourceName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java new file mode 100644 index 000000000..377ee9be3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java @@ -0,0 +1,815 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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; + +/** + * + * + *
+ * Resource name and display name.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResourceName} + */ +public final class ResourceName extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResourceName) + ResourceNameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceName.newBuilder() to construct. + private ResourceName(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceName() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceName(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceName( + 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(); + + displayName_ = 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.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.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name.
+   * 
+ * + * 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_; + /** + * + * + *
+   * 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 + 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_); + } + 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_); + } + 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.ResourceName)) { + return super.equals(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; + } + + @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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + 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.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.ResourceName parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ResourceName parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ResourceName 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.ResourceName 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; + } + /** + * + * + *
+   * Resource name and display name.
+   * 
+ * + * 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.ResourceName) + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ResourceName.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_ = ""; + + displayName_ = ""; + + 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_ResourceName_descriptor; + } + + @java.lang.Override + 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.ResourceName build() { + com.google.cloud.dialogflow.cx.v3beta1.ResourceName result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ResourceName parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ResourceName) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * 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); + } + + @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.ResourceName) + } + + // @@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.ResourceName(); + } + + 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() { + @java.lang.Override + public ResourceName parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceName(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.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..934347eb3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java @@ -0,0 +1,848 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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_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 + 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/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.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" + + "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: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( + 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.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupProto.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_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, + 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(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, + new java.lang.String[] { + "Agent", "Type", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor = + 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", "RouteGroupCoverage", "CoverageType", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "TestCases", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "TestCase", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "TestCase", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor = + 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, + new java.lang.String[] { + "Name", "Environment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor = + 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, + new java.lang.String[] { + "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor = + 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(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, + new java.lang.String[] { + "Parent", "Environment", "TestCases", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "Results", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor = + 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, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor = + 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, + new java.lang.String[] { + "TestCase", "Status", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "GcsUri", "Content", "Source", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor = + 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, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor = + 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, + new java.lang.String[] { + "TestCase", "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor = + 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, + new java.lang.String[] { + "Parent", "GcsUri", "DataFormat", "Filter", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor = + 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, + new java.lang.String[] { + "GcsUri", "Content", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor = + 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(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, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor = + 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, + 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.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupProto.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..ceddde35f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java @@ -0,0 +1,1823 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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_; + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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_ = ""; + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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; + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * string environment = 2 [(.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/TestCaseResultName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java new file mode 100644 index 000000000..41683c9e3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.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 TestCaseResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE_RESULT = + PathTemplate.createWithoutUrlEncoding( + "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 testCase; + private final String result; + + @Deprecated + protected TestCaseResultName() { + project = null; + location = null; + agent = null; + testCase = null; + result = null; + } + + private TestCaseResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + result = Preconditions.checkNotNull(builder.getResult()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public String getResult() { + return result; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TestCaseResultName of( + String project, String location, String agent, String testCase, String result) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .setResult(result) + .build(); + } + + public static String format( + String project, String location, String agent, String testCase, String result) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .setResult(result) + .build() + .toString(); + } + + public static TestCaseResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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("test_case"), + matchMap.get("result")); + } + + 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 (TestCaseResultName 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_RESULT.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); + } + if (result != null) { + fieldMapBuilder.put("result", result); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "test_case", + testCase, + "result", + result); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + 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.testCase, that.testCase) + && Objects.equals(this.result, that.result); + } + 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); + h *= 1000003; + h ^= Objects.hashCode(result); + return h; + } + + /** + * Builder for + * 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 testCase; + private String result; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public String getResult() { + return result; + } + + 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; + } + + public Builder setResult(String result) { + this.result = result; + return this; + } + + private Builder(TestCaseResultName testCaseResultName) { + project = testCaseResultName.project; + location = testCaseResultName.location; + agent = testCaseResultName.agent; + testCase = testCaseResultName.testCase; + result = testCaseResultName.result; + } + + 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..62407290e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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(); + + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * string environment = 2 [(.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..d037de92a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java @@ -0,0 +1,4511 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 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} + */ +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 a page.
+   * 
+ * + * 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 a page.
+     * 
+ * + * 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 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} + */ + 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/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/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/UpdateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java new file mode 100644 index 000000000..8e06eb85e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java @@ -0,0 +1,1070 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.UpdateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.UpdateTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} + */ +public final class UpdateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + UpdateTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTestCaseRequest.newBuilder() to construct. + private UpdateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTestCaseRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTestCaseRequest( + 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.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.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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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_; + } + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .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 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]; + * + * + * @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 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]; + * + */ + @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 (testCase_ != null) { + output.writeMessage(1, getTestCase()); + } + 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 (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); + } + 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.UpdateTestCaseRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) obj; + + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) 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 (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().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.UpdateTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.UpdateTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.UpdateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.UpdateTestCaseRequest 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.UpdateTestCaseRequest 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.UpdateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.UpdateTestCase].
+   * 
+ * + * 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.UpdateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.UpdateTestCaseRequest.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 (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.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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.testCase_ = testCaseBuilder_.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.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.UpdateTestCaseRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.getDefaultInstance()) + return this; + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + 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.UpdateTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) 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_; + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + } + /** + * + * + *
+     * Required. The test case to update.
+     * 
+ * + * + * .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.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.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 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]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * 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]; + * + * + * @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 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]; + * + */ + 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 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]; + * + */ + 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 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]; + * + */ + 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 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]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * 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]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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]; + * + */ + 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 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]; + * + */ + 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.UpdateTestCaseRequest) + } + + // @@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.UpdateTestCaseRequest(); + } + + 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() { + @java.lang.Override + public UpdateTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTestCaseRequest(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.UpdateTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 000000000..a052e6701 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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 UpdateTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase(); + /** + * + * + *
+   * Required. The test case to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder(); + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * 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]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * 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]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java new file mode 100644 index 000000000..d00ac2e96 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java @@ -0,0 +1,837 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} + */ +public final class ValidateAgentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + ValidateAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateAgentRequest.newBuilder() to construct. + private ValidateAgentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateAgentRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateAgentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateAgentRequest( + 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_ValidateAgentRequest_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_ValidateAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 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.ValidateAgentRequest)) { + return super.equals(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; + } + + @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.ValidateAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateAgentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ValidateAgentRequest 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.ValidateAgentRequest 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.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent].
+   * 
+ * + * 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.ValidateAgentRequest) + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ValidateAgentRequest.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_ValidateAgentRequest_descriptor; + } + + @java.lang.Override + 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.ValidateAgentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ValidateAgentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 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 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.ValidateAgentRequest) + } + + // @@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.ValidateAgentRequest(); + } + + 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() { + @java.lang.Override + public ValidateAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateAgentRequest(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.ValidateAgentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java new file mode 100644 index 000000000..378532e41 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.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. + */ +// 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 ValidateAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * 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/ValidateFlowRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java new file mode 100644 index 000000000..79362d65f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java @@ -0,0 +1,844 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.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.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} + */ +public final class ValidateFlowRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + ValidateFlowRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateFlowRequest.newBuilder() to construct. + private ValidateFlowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateFlowRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateFlowRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateFlowRequest( + 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_ValidateFlowRequest_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_ValidateFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow 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 flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow 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 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.ValidateFlowRequest)) { + return super.equals(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; + } + + @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.ValidateFlowRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateFlowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.ValidateFlowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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.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.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.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.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.ValidateFlowRequest 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.ValidateFlowRequest 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.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow].
+   * 
+ * + * 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.ValidateFlowRequest) + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + 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.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.ValidateFlowRequest.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_ValidateFlowRequest_descriptor; + } + + @java.lang.Override + 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.ValidateFlowRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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; + } + + @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.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.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; + } + + @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.ValidateFlowRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 flow to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow 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 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.ValidateFlowRequest) + } + + // @@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.ValidateFlowRequest(); + } + + 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() { + @java.lang.Override + public ValidateFlowRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateFlowRequest(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.ValidateFlowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java new file mode 100644 index 000000000..08b5634a4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.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 ValidateFlowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The flow to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * + * 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/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/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..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\"\234\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,89 +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\233\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\253\001\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" + + "(\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( @@ -360,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 @@ -379,7 +393,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 @@ -401,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 = @@ -479,6 +503,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/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..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: @@ -925,6 +944,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 +1058,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 +1094,7 @@ private IntentInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private IntentInfo() { lastMatchedIntent_ = ""; + displayName_ = ""; } @java.lang.Override @@ -1094,6 +1153,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 +2304,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 +2503,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 +2541,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 +2575,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 +2598,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 +2615,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 +2795,11 @@ public Builder clear() { super.clear(); lastMatchedIntent_ = ""; + displayName_ = ""; + internalGetMutableParameters().clear(); + confidence_ = 0F; + return this; } @@ -2669,8 +2831,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 +2894,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 +3051,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 +3388,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) { @@ -3166,32 +3498,732 @@ public com.google.protobuf.Parser getParserForType() { } } - public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object detectIntentResponseId_; + 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 detectIntentResponseId. + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult} */ - @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 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); + } + + private SentimentAnalysisResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SentimentAnalysisResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + 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; + } + } /** * * @@ -3544,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 @@ -3579,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); } @@ -3609,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; @@ -3647,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; } @@ -3684,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; @@ -3870,6 +4978,12 @@ public Builder clear() { payload_ = null; payloadBuilder_ = null; } + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } return this; } @@ -3933,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; } @@ -4029,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; @@ -5532,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/agent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index ba80999fd..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. @@ -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..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. @@ -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..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. @@ -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 @@ -205,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/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 491ce2177..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. @@ -104,7 +104,6 @@ service Experiments { } // Represents an experiment in an environment. -// Next ID: 13 message Experiment { option (google.api.resource) = { type: "dialogflow.googleapis.com/Experiment" @@ -112,7 +111,6 @@ message 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. @@ -151,13 +149,21 @@ message Experiment { // Metric and corresponding confidence intervals. message Metric { - // The type of the 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 @@ -182,7 +188,7 @@ message Experiment { int32 session_count = 3; } - // Types of metric for Dialogflow experiment. + // Types of ratio-based metric for Dialogflow experiment. enum MetricType { // Metric unspecified. METRIC_UNSPECIFIED = 0; @@ -204,6 +210,21 @@ message Experiment { 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; 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..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. @@ -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/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 53b74fae2..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. @@ -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 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. 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..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. @@ -147,9 +147,16 @@ 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 + // [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 + // condition specified. repeated TransitionRoute transition_routes = 9; // Handlers associated with the page to handle events such as webhook errors, @@ -238,9 +245,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 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. 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..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. @@ -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/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 new file mode 100644 index 000000000..05c07a27d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -0,0 +1,875 @@ +// 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/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/cloud/dialogflow/cx/v3beta1/transition_route_group.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/{name=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; + + // Environment where the test was run. If not set, it indicates the draft + // 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. + 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 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 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 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 { + // 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 a page. + 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; +} + +// 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 { + // 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; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; + } + + // 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 (excluding transition route groups) coverage. + TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; + } +} + +// 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. 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]; +} + +// 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..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. @@ -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..b80e4fa27 --- /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 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/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/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 e813bf304..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. @@ -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 { @@ -255,11 +259,30 @@ 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; + } + + // 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.v3beta1.DetectIntentResponse] that @@ -286,6 +309,10 @@ message WebhookRequest { // Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3beta1.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. @@ -424,9 +451,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 301fa7788..ec70d6f5c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, { @@ -138,6 +138,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", @@ -175,6 +177,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 +195,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", @@ -217,6 +223,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", @@ -254,6 +262,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 +280,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", @@ -302,6 +314,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 +326,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", @@ -341,6 +356,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 +368,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", @@ -364,6 +382,7 @@ "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", @@ -377,6 +396,7 @@ "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", @@ -386,10 +406,27 @@ "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", @@ -408,6 +445,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", @@ -466,10 +505,19 @@ "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,6 +529,8 @@ "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", @@ -489,6 +539,8 @@ "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 +549,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", @@ -548,6 +610,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 +660,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", @@ -627,12 +705,32 @@ "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/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", @@ -655,12 +753,21 @@ "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/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/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", @@ -692,17 +799,36 @@ "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", "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", @@ -721,6 +847,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", @@ -779,10 +907,19 @@ "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,6 +931,8 @@ "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", @@ -802,6 +941,8 @@ "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 +951,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", @@ -861,6 +1012,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 +1062,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", @@ -940,12 +1107,32 @@ "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/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", @@ -968,12 +1155,21 @@ "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/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/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", @@ -1005,7 +1201,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",