From 0e5848ac1c4d35e8e04e479fffefe14d859a09d4 Mon Sep 17 00:00:00 2001 From: Blake Li Date: Fri, 29 May 2026 21:13:27 +0000 Subject: [PATCH 1/2] feat: add v1 version support for geminidataanalytics --- generation_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/generation_config.yaml b/generation_config.yaml index 770a49d2dfd0..5253099be38f 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1192,6 +1192,7 @@ libraries: group_id: com.google.cloud cloud_api: true GAPICs: + - proto_path: google/cloud/geminidataanalytics/v1 - proto_path: google/cloud/geminidataanalytics/v1beta requires_billing: true rpc_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/reference From 13d14701b5257ef667863bec6defb45ec1b05888 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 29 May 2026 22:42:13 +0000 Subject: [PATCH 2/2] chore: generate libraries at Fri May 29 22:40:06 UTC 2026 --- .../pom.xml | 10 + .../google-cloud-geminidataanalytics/pom.xml | 9 + .../v1/DataAgentServiceClient.java | 2396 ++++++ .../v1/DataAgentServiceSettings.java | 430 + .../v1/DataChatServiceClient.java | 1517 ++++ .../v1/DataChatServiceSettings.java | 310 + .../v1/gapic_metadata.json | 90 + .../geminidataanalytics/v1/package-info.java | 66 + .../v1/stub/DataAgentServiceStub.java | 151 + .../v1/stub/DataAgentServiceStubSettings.java | 1019 +++ .../v1/stub/DataChatServiceStub.java | 101 + .../v1/stub/DataChatServiceStubSettings.java | 725 ++ .../GrpcDataAgentServiceCallableFactory.java | 113 + .../v1/stub/GrpcDataAgentServiceStub.java | 652 ++ .../GrpcDataChatServiceCallableFactory.java | 113 + .../v1/stub/GrpcDataChatServiceStub.java | 441 + ...tpJsonDataAgentServiceCallableFactory.java | 101 + .../v1/stub/HttpJsonDataAgentServiceStub.java | 1089 +++ ...ttpJsonDataChatServiceCallableFactory.java | 101 + .../v1/stub/HttpJsonDataChatServiceStub.java | 666 ++ .../reflect-config.json | 3710 +++++++++ .../DataAgentServiceClientHttpJsonTest.java | 1267 +++ .../v1/DataAgentServiceClientTest.java | 1124 +++ .../v1/DataChatServiceClientHttpJsonTest.java | 704 ++ .../v1/DataChatServiceClientTest.java | 682 ++ .../v1/MockDataAgentService.java | 59 + .../v1/MockDataAgentServiceImpl.java | 296 + .../v1/MockDataChatService.java | 59 + .../v1/MockDataChatServiceImpl.java | 187 + .../geminidataanalytics/v1/MockLocations.java | 59 + .../v1/MockLocationsImpl.java | 105 + .../pom.xml | 45 + .../v1/DataAgentServiceGrpc.java | 1744 ++++ .../v1/DataChatServiceGrpc.java | 1105 +++ java-geminidataanalytics/pom.xml | 12 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 37 + .../geminidataanalytics/v1/AnalysisEvent.java | 2908 +++++++ .../v1/AnalysisEventOrBuilder.java | 420 + .../v1/AnalysisMessage.java | 1108 +++ .../v1/AnalysisMessageOrBuilder.java | 104 + .../v1/AnalysisOptions.java | 1243 +++ .../v1/AnalysisOptionsOrBuilder.java | 71 + .../geminidataanalytics/v1/AnalysisQuery.java | 887 ++ .../v1/AnalysisQueryOrBuilder.java | 108 + .../geminidataanalytics/v1/BigQueryJob.java | 1739 ++++ .../v1/BigQueryJobOrBuilder.java | 229 + .../v1/BigQueryPropertyGraphReference.java | 987 +++ ...gQueryPropertyGraphReferenceOrBuilder.java | 106 + .../v1/BigQueryRoutine.java | 917 +++ .../v1/BigQueryRoutineOrBuilder.java | 97 + .../v1/BigQueryRoutineReference.java | 982 +++ .../v1/BigQueryRoutineReferenceOrBuilder.java | 106 + .../v1/BigQueryTableReference.java | 1297 +++ .../v1/BigQueryTableReferenceOrBuilder.java | 149 + .../v1/BigQueryTableReferences.java | 1008 +++ .../v1/BigQueryTableReferencesOrBuilder.java | 96 + .../cloud/geminidataanalytics/v1/Blob.java | 695 ++ .../geminidataanalytics/v1/BlobOrBuilder.java | 67 + .../geminidataanalytics/v1/ChartMessage.java | 1101 +++ .../v1/ChartMessageOrBuilder.java | 104 + .../geminidataanalytics/v1/ChartQuery.java | 792 ++ .../v1/ChartQueryOrBuilder.java | 82 + .../geminidataanalytics/v1/ChartResult.java | 1015 +++ .../v1/ChartResultOrBuilder.java | 111 + .../geminidataanalytics/v1/ChatRequest.java | 4229 ++++++++++ .../v1/ChatRequestOrBuilder.java | 494 ++ .../geminidataanalytics/v1/Citation.java | 1548 ++++ .../v1/CitationAnchor.java | 1992 +++++ .../v1/CitationAnchorOrBuilder.java | 75 + .../v1/CitationOrBuilder.java | 160 + .../v1/CitationSource.java | 1784 ++++ .../v1/CitationSourceOrBuilder.java | 209 + .../v1/ClientManagedResourceContext.java | 1134 +++ ...ClientManagedResourceContextOrBuilder.java | 126 + .../cloud/geminidataanalytics/v1/Context.java | 7174 +++++++++++++++++ .../v1/ContextOrBuilder.java | 501 ++ .../geminidataanalytics/v1/ContextProto.java | 490 ++ .../geminidataanalytics/v1/Conversation.java | 2426 ++++++ .../v1/ConversationName.java | 227 + .../v1/ConversationOptions.java | 1411 ++++ .../v1/ConversationOptionsOrBuilder.java | 159 + .../v1/ConversationOrBuilder.java | 388 + .../v1/ConversationProto.java | 220 + .../v1/ConversationReference.java | 953 +++ .../v1/ConversationReferenceOrBuilder.java | 105 + .../v1/CreateConversationRequest.java | 1381 ++++ .../CreateConversationRequestOrBuilder.java | 171 + .../v1/CreateDataAgentRequest.java | 1425 ++++ .../v1/CreateDataAgentRequestOrBuilder.java | 185 + .../geminidataanalytics/v1/Credentials.java | 795 ++ .../v1/CredentialsOrBuilder.java | 67 + .../v1/CredentialsProto.java | 140 + .../geminidataanalytics/v1/DataAgent.java | 3399 ++++++++ .../v1/DataAgentContext.java | 972 +++ .../v1/DataAgentContextOrBuilder.java | 88 + .../geminidataanalytics/v1/DataAgentName.java | 223 + .../v1/DataAgentOrBuilder.java | 491 ++ .../v1/DataAgentProto.java | 146 + .../v1/DataAgentServiceProto.java | 349 + .../v1/DataAnalyticsAgent.java | 1409 ++++ .../v1/DataAnalyticsAgentOrBuilder.java | 172 + .../v1/DataAnalyticsAgentProto.java | 102 + .../v1/DataChatServiceProto.java | 700 ++ .../geminidataanalytics/v1/DataFilter.java | 985 +++ .../v1/DataFilterOrBuilder.java | 116 + .../v1/DataFilterType.java | 174 + .../geminidataanalytics/v1/DataMessage.java | 1960 +++++ .../v1/DataMessageOrBuilder.java | 217 + .../geminidataanalytics/v1/DataQuery.java | 1805 +++++ .../v1/DataQueryOrBuilder.java | 201 + .../geminidataanalytics/v1/DataResult.java | 2218 +++++ .../v1/DataResultOrBuilder.java | 272 + .../geminidataanalytics/v1/Datasource.java | 2433 ++++++ .../v1/DatasourceOptions.java | 765 ++ .../v1/DatasourceOptionsOrBuilder.java | 80 + .../v1/DatasourceOrBuilder.java | 294 + .../v1/DatasourceProto.java | 340 + .../v1/DatasourceReferences.java | 1443 ++++ .../v1/DatasourceReferencesOrBuilder.java | 141 + .../v1/DeleteConversationRequest.java | 634 ++ .../DeleteConversationRequestOrBuilder.java | 62 + .../v1/DeleteDataAgentRequest.java | 904 +++ .../v1/DeleteDataAgentRequestOrBuilder.java | 112 + .../geminidataanalytics/v1/ErrorMessage.java | 622 ++ .../v1/ErrorMessageOrBuilder.java | 54 + .../v1/ExampleQueries.java | 1054 +++ .../v1/ExampleQueriesOrBuilder.java | 110 + .../geminidataanalytics/v1/ExampleQuery.java | 1592 ++++ .../v1/ExampleQueryOrBuilder.java | 184 + .../cloud/geminidataanalytics/v1/Field.java | 2937 +++++++ .../v1/FieldOrBuilder.java | 404 + .../v1/GetConversationRequest.java | 631 ++ .../v1/GetConversationRequestOrBuilder.java | 62 + .../v1/GetDataAgentRequest.java | 611 ++ .../v1/GetDataAgentRequestOrBuilder.java | 58 + .../geminidataanalytics/v1/GlossaryTerm.java | 1109 +++ .../v1/GlossaryTermOrBuilder.java | 144 + .../v1/ListAccessibleDataAgentsRequest.java | 1819 +++++ ...tAccessibleDataAgentsRequestOrBuilder.java | 207 + .../v1/ListAccessibleDataAgentsResponse.java | 1429 ++++ ...AccessibleDataAgentsResponseOrBuilder.java | 164 + .../v1/ListConversationsRequest.java | 1133 +++ .../v1/ListConversationsRequestOrBuilder.java | 134 + .../v1/ListConversationsResponse.java | 1137 +++ .../ListConversationsResponseOrBuilder.java | 111 + .../v1/ListDataAgentsRequest.java | 1426 ++++ .../v1/ListDataAgentsRequestOrBuilder.java | 176 + .../v1/ListDataAgentsResponse.java | 1418 ++++ .../v1/ListDataAgentsResponseOrBuilder.java | 164 + .../v1/ListMessagesRequest.java | 1147 +++ .../v1/ListMessagesRequestOrBuilder.java | 140 + .../v1/ListMessagesResponse.java | 1129 +++ .../v1/ListMessagesResponseOrBuilder.java | 110 + .../geminidataanalytics/v1/LocationName.java | 192 + .../v1/LookerExploreReference.java | 1823 +++++ .../v1/LookerExploreReferenceOrBuilder.java | 220 + .../v1/LookerExploreReferences.java | 1005 +++ .../v1/LookerExploreReferencesOrBuilder.java | 96 + .../v1/LookerGoldenQuery.java | 1057 +++ .../v1/LookerGoldenQueryOrBuilder.java | 133 + .../geminidataanalytics/v1/LookerQuery.java | 3571 ++++++++ .../v1/LookerQueryOrBuilder.java | 384 + .../v1/LookerSettings.java | 524 ++ .../v1/LookerSettingsOrBuilder.java | 46 + .../geminidataanalytics/v1/MatchedQuery.java | 1298 +++ .../v1/MatchedQueryOrBuilder.java | 133 + .../cloud/geminidataanalytics/v1/Message.java | 1616 ++++ .../v1/MessageOrBuilder.java | 176 + .../v1/OAuthCredentials.java | 2591 ++++++ .../v1/OAuthCredentialsOrBuilder.java | 105 + .../v1/OperationMetadata.java | 1870 +++++ .../v1/OperationMetadataOrBuilder.java | 229 + .../v1/PrivateLookerInstanceInfo.java | 797 ++ .../PrivateLookerInstanceInfoOrBuilder.java | 80 + .../v1/QueryParameter.java | 1012 +++ .../v1/QueryParameterOrBuilder.java | 116 + .../v1/QueryParameterValues.java | 794 ++ .../v1/QueryParameterValuesOrBuilder.java | 80 + .../cloud/geminidataanalytics/v1/Schema.java | 2590 ++++++ .../geminidataanalytics/v1/SchemaMessage.java | 1102 +++ .../v1/SchemaMessageOrBuilder.java | 104 + .../v1/SchemaOrBuilder.java | 349 + .../geminidataanalytics/v1/SchemaQuery.java | 596 ++ .../v1/SchemaQueryOrBuilder.java | 54 + .../geminidataanalytics/v1/SchemaResult.java | 979 +++ .../v1/SchemaResultOrBuilder.java | 94 + .../v1/StorageMessage.java | 889 ++ .../v1/StorageMessageOrBuilder.java | 91 + .../v1/StudioDatasourceReference.java | 606 ++ .../StudioDatasourceReferenceOrBuilder.java | 54 + .../v1/StudioDatasourceReferences.java | 1012 +++ .../StudioDatasourceReferencesOrBuilder.java | 97 + .../geminidataanalytics/v1/SystemMessage.java | 3138 +++++++ .../v1/SystemMessageOrBuilder.java | 368 + .../geminidataanalytics/v1/TextMessage.java | 1205 +++ .../v1/TextMessageOrBuilder.java | 126 + .../v1/UpdateDataAgentRequest.java | 1380 ++++ .../v1/UpdateDataAgentRequestOrBuilder.java | 183 + .../geminidataanalytics/v1/UserFunctions.java | 940 +++ .../v1/UserFunctionsOrBuilder.java | 85 + .../geminidataanalytics/v1/UserMessage.java | 729 ++ .../v1/UserMessageOrBuilder.java | 69 + .../geminidataanalytics/v1/context.proto | 403 + .../geminidataanalytics/v1/conversation.proto | 190 + .../geminidataanalytics/v1/credentials.proto | 65 + .../geminidataanalytics/v1/data_agent.proto | 112 + .../v1/data_agent_service.proto | 412 + .../v1/data_analytics_agent.proto | 46 + .../v1/data_chat_service.proto | 682 ++ .../geminidataanalytics/v1/datasource.proto | 262 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../createdataagent/AsyncCreateDataAgent.java | 54 + .../AsyncCreateDataAgentLRO.java | 54 + .../createdataagent/SyncCreateDataAgent.java | 49 + ...eDataAgentLocationnameDataagentString.java | 45 + ...cCreateDataAgentStringDataagentString.java | 45 + .../AsyncCreateDataAgentSync.java | 53 + .../SyncCreateDataAgentSync.java | 49 + ...aAgentSyncLocationnameDataagentString.java | 45 + ...ateDataAgentSyncStringDataagentString.java | 45 + .../deletedataagent/AsyncDeleteDataAgent.java | 51 + .../AsyncDeleteDataAgentLRO.java | 52 + .../deletedataagent/SyncDeleteDataAgent.java | 47 + .../SyncDeleteDataAgentDataagentname.java | 42 + .../SyncDeleteDataAgentString.java | 42 + .../AsyncDeleteDataAgentSync.java | 51 + .../SyncDeleteDataAgentSync.java | 47 + .../SyncDeleteDataAgentSyncDataagentname.java | 42 + .../SyncDeleteDataAgentSyncString.java | 42 + .../getdataagent/AsyncGetDataAgent.java | 50 + .../getdataagent/SyncGetDataAgent.java | 46 + .../SyncGetDataAgentDataagentname.java | 42 + .../getdataagent/SyncGetDataAgentString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyResourcename.java | 43 + .../getiampolicy/SyncGetIamPolicyString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../AsyncListAccessibleDataAgents.java | 57 + .../AsyncListAccessibleDataAgentsPaged.java | 65 + .../SyncListAccessibleDataAgents.java | 54 + ...cListAccessibleDataAgentsLocationname.java | 45 + .../SyncListAccessibleDataAgentsString.java | 45 + .../listdataagents/AsyncListDataAgents.java | 57 + .../AsyncListDataAgentsPaged.java | 65 + .../listdataagents/SyncListDataAgents.java | 53 + .../SyncListDataAgentsLocationname.java | 44 + .../SyncListDataAgentsString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + .../SyncSetIamPolicyResourcename.java | 43 + .../setiampolicy/SyncSetIamPolicyString.java | 42 + .../updatedataagent/AsyncUpdateDataAgent.java | 53 + .../AsyncUpdateDataAgentLRO.java | 53 + .../updatedataagent/SyncUpdateDataAgent.java | 48 + ...SyncUpdateDataAgentDataagentFieldmask.java | 43 + .../AsyncUpdateDataAgentSync.java | 52 + .../SyncUpdateDataAgentSync.java | 48 + ...UpdateDataAgentSyncDataagentFieldmask.java | 43 + .../createdataagent/SyncCreateDataAgent.java | 54 + .../getdataagent/SyncGetDataAgent.java | 56 + .../v1/datachatservice/chat/AsyncChat.java | 53 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../AsyncCreateConversation.java | 53 + .../SyncCreateConversation.java | 49 + ...rsationLocationnameConversationString.java | 45 + ...eConversationStringConversationString.java | 45 + .../AsyncDeleteConversation.java | 50 + .../SyncDeleteConversation.java | 46 + ...yncDeleteConversationConversationname.java | 42 + .../SyncDeleteConversationString.java | 42 + .../getconversation/AsyncGetConversation.java | 50 + .../getconversation/SyncGetConversation.java | 46 + .../SyncGetConversationConversationname.java | 42 + .../SyncGetConversationString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../AsyncListConversations.java | 55 + .../AsyncListConversationsPaged.java | 63 + .../SyncListConversations.java | 51 + .../SyncListConversationsLocationname.java | 44 + .../SyncListConversationsString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../listmessages/AsyncListMessages.java | 56 + .../listmessages/AsyncListMessagesPaged.java | 63 + .../listmessages/SyncListMessages.java | 52 + .../SyncListMessagesConversationname.java | 44 + .../listmessages/SyncListMessagesString.java | 44 + .../SyncCreateConversation.java | 56 + .../createdataagent/SyncCreateDataAgent.java | 54 + .../getdataagent/SyncGetDataAgent.java | 56 + .../SyncCreateConversation.java | 56 + versions.txt | 2 + 304 files changed, 157947 insertions(+) create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClient.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceSettings.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClient.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceSettings.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/gapic_metadata.json create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/package-info.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStubSettings.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStubSettings.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceCallableFactory.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceCallableFactory.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceCallableFactory.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceCallableFactory.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceStub.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/resources/META-INF/native-image/com.google.cloud.geminidataanalytics.v1/reflect-config.json create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientHttpJsonTest.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientTest.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientHttpJsonTest.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientTest.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentService.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentServiceImpl.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatService.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatServiceImpl.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocations.java create mode 100644 java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocationsImpl.java create mode 100644 java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/pom.xml create mode 100644 java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceGrpc.java create mode 100644 java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceGrpc.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/clirr-ignored-differences.xml create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/pom.xml create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEvent.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEventOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptions.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptionsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJob.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJobOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutine.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferences.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferencesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Blob.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BlobOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResult.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResultOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Citation.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchor.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchorOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSource.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSourceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContext.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContextOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Context.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Conversation.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationName.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptions.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptionsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Credentials.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgent.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContext.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContextOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentName.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgent.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilter.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterType.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResult.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResultOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Datasource.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptions.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptionsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceProto.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferences.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferencesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueries.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueriesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Field.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/FieldOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTerm.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTermOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponse.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponseOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponse.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponseOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponse.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponseOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponse.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponseOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LocationName.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferences.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferencesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettings.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettingsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Message.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentials.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentialsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadata.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadataOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfo.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfoOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameter.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValues.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValuesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Schema.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQuery.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQueryOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResult.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResultOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReference.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferenceOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferences.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferencesOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequest.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequestOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctions.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctionsOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessage.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessageOrBuilder.java create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/context.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/conversation.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/credentials.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent_service.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_analytics_agent.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_chat_service.proto create mode 100644 java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/datasource.proto create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetEndpoint.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgentLRO.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentLocationnameDataagentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentStringDataagentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/AsyncCreateDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncLocationnameDataagentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncStringDataagentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgentLRO.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentDataagentname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/AsyncDeleteDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncDataagentname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/AsyncGetDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentDataagentname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyResourcename.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/AsyncGetLocation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/SyncGetLocation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgents.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgentsPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgents.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsLocationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgents.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgentsPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgents.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsLocationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/SyncListLocations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyResourcename.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgentLRO.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgentDataagentFieldmask.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/AsyncUpdateDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSync.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSyncDataagentFieldmask.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/createdataagent/SyncCreateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/getdataagent/SyncGetDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/chat/AsyncChat.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetEndpoint.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/AsyncCreateConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationLocationnameConversationString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationStringConversationString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/AsyncDeleteConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationConversationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/AsyncGetConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationConversationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/AsyncGetLocation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/SyncGetLocation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversationsPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsLocationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/SyncListLocations.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessages.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessagesPaged.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessages.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesConversationname.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesString.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservicesettings/createconversation/SyncCreateConversation.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/createdataagent/SyncCreateDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/getdataagent/SyncGetDataAgent.java create mode 100644 java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/datachatservicestubsettings/createconversation/SyncCreateConversation.java diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics-bom/pom.xml b/java-geminidataanalytics/google-cloud-geminidataanalytics-bom/pom.xml index 5899c14d1c58..ae6ca25cb1ce 100644 --- a/java-geminidataanalytics/google-cloud-geminidataanalytics-bom/pom.xml +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics-bom/pom.xml @@ -33,11 +33,21 @@ grpc-google-cloud-geminidataanalytics-v1beta 0.21.0-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-geminidataanalytics-v1beta 0.21.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/pom.xml b/java-geminidataanalytics/google-cloud-geminidataanalytics/pom.xml index f114c293b100..5c2b6d7a9f66 100644 --- a/java-geminidataanalytics/google-cloud-geminidataanalytics/pom.xml +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/pom.xml @@ -41,6 +41,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-geminidataanalytics-v1 + com.google.api.grpc proto-google-cloud-geminidataanalytics-v1beta @@ -76,6 +80,11 @@ grpc-google-common-protos test + + com.google.api.grpc + grpc-google-cloud-geminidataanalytics-v1 + test + com.google.api.grpc grpc-google-iam-v1 diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClient.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClient.java new file mode 100644 index 000000000000..7f8d1831c14d --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClient.java @@ -0,0 +1,2396 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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.httpjson.longrunning.OperationsClient; +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.api.resourcenames.ResourceName; +import com.google.cloud.geminidataanalytics.v1.stub.DataAgentServiceStub; +import com.google.cloud.geminidataanalytics.v1.stub.DataAgentServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.longrunning.Operation; +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 describing handlers for resources. + * + *

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
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+ *   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+ *   DataAgent response = dataAgentServiceClient.getDataAgent(name);
+ * }
+ * }
+ * + *

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

ListDataAgents

Lists DataAgents in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDataAgents(ListDataAgentsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDataAgents(LocationName parent) + *

  • listDataAgents(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDataAgentsPagedCallable() + *

  • listDataAgentsCallable() + *

+ *

ListAccessibleDataAgents

Lists DataAgents that are accessible to the caller in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAccessibleDataAgents(ListAccessibleDataAgentsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAccessibleDataAgents(LocationName parent) + *

  • listAccessibleDataAgents(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAccessibleDataAgentsPagedCallable() + *

  • listAccessibleDataAgentsCallable() + *

+ *

GetDataAgent

Gets details of a single DataAgent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDataAgent(GetDataAgentRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDataAgent(DataAgentName name) + *

  • getDataAgent(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDataAgentCallable() + *

+ *

CreateDataAgent

Creates a new DataAgent in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createDataAgentAsync(CreateDataAgentRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createDataAgentAsync(LocationName parent, DataAgent dataAgent, String dataAgentId) + *

  • createDataAgentAsync(String parent, DataAgent dataAgent, String dataAgentId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createDataAgentOperationCallable() + *

  • createDataAgentCallable() + *

+ *

CreateDataAgentSync

Creates a new DataAgent in a given project and location synchronously.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createDataAgentSync(CreateDataAgentRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createDataAgentSync(LocationName parent, DataAgent dataAgent, String dataAgentId) + *

  • createDataAgentSync(String parent, DataAgent dataAgent, String dataAgentId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createDataAgentSyncCallable() + *

+ *

UpdateDataAgent

Updates the parameters of a single DataAgent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDataAgentAsync(UpdateDataAgentRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateDataAgentAsync(DataAgent dataAgent, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDataAgentOperationCallable() + *

  • updateDataAgentCallable() + *

+ *

UpdateDataAgentSync

Updates the parameters of a single DataAgent synchronously.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDataAgentSync(UpdateDataAgentRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateDataAgentSync(DataAgent dataAgent, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDataAgentSyncCallable() + *

+ *

DeleteDataAgent

Deletes a single DataAgent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteDataAgentAsync(DeleteDataAgentRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteDataAgentAsync(DataAgentName name) + *

  • deleteDataAgentAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteDataAgentOperationCallable() + *

  • deleteDataAgentCallable() + *

+ *

DeleteDataAgentSync

Deletes a single DataAgent synchronously.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteDataAgentSync(DeleteDataAgentRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteDataAgentSync(DataAgentName name) + *

  • deleteDataAgentSync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteDataAgentSyncCallable() + *

+ *

GetIamPolicy

Gets the IAM policy for DataAgent

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *

  • getIamPolicy(String resource) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

SetIamPolicy

Sets the IAM policy for a DataAgent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource) + *

  • setIamPolicy(String resource) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 DataAgentServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceSettings dataAgentServiceSettings =
+ *     DataAgentServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataAgentServiceClient dataAgentServiceClient =
+ *     DataAgentServiceClient.create(dataAgentServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceSettings dataAgentServiceSettings =
+ *     DataAgentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataAgentServiceClient dataAgentServiceClient =
+ *     DataAgentServiceClient.create(dataAgentServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceSettings dataAgentServiceSettings =
+ *     DataAgentServiceSettings.newHttpJsonBuilder().build();
+ * DataAgentServiceClient dataAgentServiceClient =
+ *     DataAgentServiceClient.create(dataAgentServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataAgentServiceClient implements BackgroundResource { + private final DataAgentServiceSettings settings; + private final DataAgentServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DataAgentServiceClient with default settings. */ + public static final DataAgentServiceClient create() throws IOException { + return create(DataAgentServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataAgentServiceClient, 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 DataAgentServiceClient create(DataAgentServiceSettings settings) + throws IOException { + return new DataAgentServiceClient(settings); + } + + /** + * Constructs an instance of DataAgentServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(DataAgentServiceSettings). + */ + public static final DataAgentServiceClient create(DataAgentServiceStub stub) { + return new DataAgentServiceClient(stub); + } + + /** + * Constructs an instance of DataAgentServiceClient, 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 DataAgentServiceClient(DataAgentServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataAgentServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DataAgentServiceClient(DataAgentServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final DataAgentServiceSettings getSettings() { + return settings; + } + + public DataAgentServiceStub 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 com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDataAgentsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAgentsPagedResponse listDataAgents(LocationName parent) { + ListDataAgentsRequest request = + ListDataAgentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDataAgentsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAgentsPagedResponse listDataAgents(String parent) { + ListDataAgentsRequest request = ListDataAgentsRequest.newBuilder().setParent(parent).build(); + return listDataAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListDataAgentsRequest request =
+   *       ListDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (DataAgent element : dataAgentServiceClient.listDataAgents(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 ListDataAgentsPagedResponse listDataAgents(ListDataAgentsRequest request) { + return listDataAgentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListDataAgentsRequest request =
+   *       ListDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.listDataAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataAgent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataAgentsPagedCallable() { + return stub.listDataAgentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListDataAgentsRequest request =
+   *       ListDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListDataAgentsResponse response =
+   *         dataAgentServiceClient.listDataAgentsCallable().call(request);
+   *     for (DataAgent element : response.getDataAgentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataAgentsCallable() { + return stub.listDataAgentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents that are accessible to the caller in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DataAgent element :
+   *       dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAccessibleDataAgentsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents(LocationName parent) { + ListAccessibleDataAgentsRequest request = + ListAccessibleDataAgentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccessibleDataAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents that are accessible to the caller in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DataAgent element :
+   *       dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAccessibleDataAgentsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents(String parent) { + ListAccessibleDataAgentsRequest request = + ListAccessibleDataAgentsRequest.newBuilder().setParent(parent).build(); + return listAccessibleDataAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents that are accessible to the caller in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListAccessibleDataAgentsRequest request =
+   *       ListAccessibleDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (DataAgent element :
+   *       dataAgentServiceClient.listAccessibleDataAgents(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 ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents( + ListAccessibleDataAgentsRequest request) { + return listAccessibleDataAgentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents that are accessible to the caller in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListAccessibleDataAgentsRequest request =
+   *       ListAccessibleDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.listAccessibleDataAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataAgent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAccessibleDataAgentsPagedCallable() { + return stub.listAccessibleDataAgentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAgents that are accessible to the caller in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListAccessibleDataAgentsRequest request =
+   *       ListAccessibleDataAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListAccessibleDataAgentsResponse response =
+   *         dataAgentServiceClient.listAccessibleDataAgentsCallable().call(request);
+   *     for (DataAgent element : response.getDataAgentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAccessibleDataAgentsCallable() { + return stub.listAccessibleDataAgentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+   *   DataAgent response = dataAgentServiceClient.getDataAgent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAgent getDataAgent(DataAgentName name) { + GetDataAgentRequest request = + GetDataAgentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
+   *   DataAgent response = dataAgentServiceClient.getDataAgent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAgent getDataAgent(String name) { + GetDataAgentRequest request = GetDataAgentRequest.newBuilder().setName(name).build(); + return getDataAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetDataAgentRequest request =
+   *       GetDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .build();
+   *   DataAgent response = dataAgentServiceClient.getDataAgent(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 DataAgent getDataAgent(GetDataAgentRequest request) { + return getDataAgentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetDataAgentRequest request =
+   *       GetDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.getDataAgentCallable().futureCall(request);
+   *   // Do something.
+   *   DataAgent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataAgentCallable() { + return stub.getDataAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   String dataAgentId = "dataAgentId1752773622";
+   *   DataAgent response =
+   *       dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param dataAgent Required. The resource being created. + * @param dataAgentId Optional. Id of the requesting object. Must be unique within the parent. The + * allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will + * auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataAgentAsync( + LocationName parent, DataAgent dataAgent, String dataAgentId) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataAgent(dataAgent) + .setDataAgentId(dataAgentId) + .build(); + return createDataAgentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   String dataAgentId = "dataAgentId1752773622";
+   *   DataAgent response =
+   *       dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param dataAgent Required. The resource being created. + * @param dataAgentId Optional. Id of the requesting object. Must be unique within the parent. The + * allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will + * auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataAgentAsync( + String parent, DataAgent dataAgent, String dataAgentId) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(parent) + .setDataAgent(dataAgent) + .setDataAgentId(dataAgentId) + .build(); + return createDataAgentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   CreateDataAgentRequest request =
+   *       CreateDataAgentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAgentId("dataAgentId1752773622")
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   DataAgent response = dataAgentServiceClient.createDataAgentAsync(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 createDataAgentAsync( + CreateDataAgentRequest request) { + return createDataAgentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   CreateDataAgentRequest request =
+   *       CreateDataAgentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAgentId("dataAgentId1752773622")
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataAgentServiceClient.createDataAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataAgent response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDataAgentOperationCallable() { + return stub.createDataAgentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   CreateDataAgentRequest request =
+   *       CreateDataAgentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAgentId("dataAgentId1752773622")
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.createDataAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataAgentCallable() { + return stub.createDataAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   String dataAgentId = "dataAgentId1752773622";
+   *   DataAgent response =
+   *       dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId);
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param dataAgent Required. The resource being created. + * @param dataAgentId Optional. Id of the requesting object. Must be unique within the parent. The + * allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will + * auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAgent createDataAgentSync( + LocationName parent, DataAgent dataAgent, String dataAgentId) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataAgent(dataAgent) + .setDataAgentId(dataAgentId) + .build(); + return createDataAgentSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   String dataAgentId = "dataAgentId1752773622";
+   *   DataAgent response =
+   *       dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId);
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param dataAgent Required. The resource being created. + * @param dataAgentId Optional. Id of the requesting object. Must be unique within the parent. The + * allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will + * auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAgent createDataAgentSync( + String parent, DataAgent dataAgent, String dataAgentId) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(parent) + .setDataAgent(dataAgent) + .setDataAgentId(dataAgentId) + .build(); + return createDataAgentSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   CreateDataAgentRequest request =
+   *       CreateDataAgentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAgentId("dataAgentId1752773622")
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   DataAgent response = dataAgentServiceClient.createDataAgentSync(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 DataAgent createDataAgentSync(CreateDataAgentRequest request) { + return createDataAgentSyncCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DataAgent in a given project and location synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   CreateDataAgentRequest request =
+   *       CreateDataAgentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAgentId("dataAgentId1752773622")
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.createDataAgentSyncCallable().futureCall(request);
+   *   // Do something.
+   *   DataAgent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataAgentSyncCallable() { + return stub.createDataAgentSyncCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataAgent response = dataAgentServiceClient.updateDataAgentAsync(dataAgent, updateMask).get();
+   * }
+   * }
+ * + * @param dataAgent Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields with non-default values present in the + * request will be overwritten. If a wildcard mask is provided, all fields will be + * overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataAgentAsync( + DataAgent dataAgent, FieldMask updateMask) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setDataAgent(dataAgent) + .setUpdateMask(updateMask) + .build(); + return updateDataAgentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   UpdateDataAgentRequest request =
+   *       UpdateDataAgentRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   DataAgent response = dataAgentServiceClient.updateDataAgentAsync(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 updateDataAgentAsync( + UpdateDataAgentRequest request) { + return updateDataAgentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   UpdateDataAgentRequest request =
+   *       UpdateDataAgentRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataAgentServiceClient.updateDataAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataAgent response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDataAgentOperationCallable() { + return stub.updateDataAgentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   UpdateDataAgentRequest request =
+   *       UpdateDataAgentRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.updateDataAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataAgentCallable() { + return stub.updateDataAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DataAgent dataAgent = DataAgent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataAgent response = dataAgentServiceClient.updateDataAgentSync(dataAgent, updateMask);
+   * }
+   * }
+ * + * @param dataAgent Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields with non-default values present in the + * request will be overwritten. If a wildcard mask is provided, all fields will be + * overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAgent updateDataAgentSync(DataAgent dataAgent, FieldMask updateMask) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setDataAgent(dataAgent) + .setUpdateMask(updateMask) + .build(); + return updateDataAgentSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   UpdateDataAgentRequest request =
+   *       UpdateDataAgentRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   DataAgent response = dataAgentServiceClient.updateDataAgentSync(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 DataAgent updateDataAgentSync(UpdateDataAgentRequest request) { + return updateDataAgentSyncCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   UpdateDataAgentRequest request =
+   *       UpdateDataAgentRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAgent(DataAgent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.updateDataAgentSyncCallable().futureCall(request);
+   *   // Do something.
+   *   DataAgent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataAgentSyncCallable() { + return stub.updateDataAgentSyncCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+   *   dataAgentServiceClient.deleteDataAgentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAgentAsync(DataAgentName name) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteDataAgentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
+   *   dataAgentServiceClient.deleteDataAgentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAgentAsync(String name) { + DeleteDataAgentRequest request = DeleteDataAgentRequest.newBuilder().setName(name).build(); + return deleteDataAgentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DeleteDataAgentRequest request =
+   *       DeleteDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   dataAgentServiceClient.deleteDataAgentAsync(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 deleteDataAgentAsync( + DeleteDataAgentRequest request) { + return deleteDataAgentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DeleteDataAgentRequest request =
+   *       DeleteDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataAgentServiceClient.deleteDataAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDataAgentOperationCallable() { + return stub.deleteDataAgentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DeleteDataAgentRequest request =
+   *       DeleteDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.deleteDataAgentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataAgentCallable() { + return stub.deleteDataAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+   *   dataAgentServiceClient.deleteDataAgentSync(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataAgentSync(DataAgentName name) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDataAgentSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
+   *   dataAgentServiceClient.deleteDataAgentSync(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataAgentSync(String name) { + DeleteDataAgentRequest request = DeleteDataAgentRequest.newBuilder().setName(name).build(); + deleteDataAgentSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DeleteDataAgentRequest request =
+   *       DeleteDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   dataAgentServiceClient.deleteDataAgentSync(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 deleteDataAgentSync(DeleteDataAgentRequest request) { + deleteDataAgentSyncCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DataAgent synchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   DeleteDataAgentRequest request =
+   *       DeleteDataAgentRequest.newBuilder()
+   *           .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.deleteDataAgentSyncCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataAgentSyncCallable() { + return stub.deleteDataAgentSyncCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for DataAgent + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+   *   Policy response = dataAgentServiceClient.getIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(ResourceName resource) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for DataAgent + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String resource = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
+   *   Policy response = dataAgentServiceClient.getIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for DataAgent + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataAgentServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for DataAgent + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataAgentServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+   *   Policy response = dataAgentServiceClient.setIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(ResourceName resource) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   String resource = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
+   *   Policy response = dataAgentServiceClient.setIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(String resource) { + SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder().setResource(resource).build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataAgentServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a DataAgent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataAgentServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataAgentServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataAgentServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataAgentServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataAgentServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataAgentServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListDataAgentsPagedResponse + extends AbstractPagedListResponse< + ListDataAgentsRequest, + ListDataAgentsResponse, + DataAgent, + ListDataAgentsPage, + ListDataAgentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataAgentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataAgentsPagedResponse(ListDataAgentsPage page) { + super(page, ListDataAgentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataAgentsPage + extends AbstractPage< + ListDataAgentsRequest, ListDataAgentsResponse, DataAgent, ListDataAgentsPage> { + + private ListDataAgentsPage( + PageContext context, + ListDataAgentsResponse response) { + super(context, response); + } + + private static ListDataAgentsPage createEmptyPage() { + return new ListDataAgentsPage(null, null); + } + + @Override + protected ListDataAgentsPage createPage( + PageContext context, + ListDataAgentsResponse response) { + return new ListDataAgentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataAgentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataAgentsRequest, + ListDataAgentsResponse, + DataAgent, + ListDataAgentsPage, + ListDataAgentsFixedSizeCollection> { + + private ListDataAgentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataAgentsFixedSizeCollection createEmptyCollection() { + return new ListDataAgentsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataAgentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataAgentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAccessibleDataAgentsPagedResponse + extends AbstractPagedListResponse< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + DataAgent, + ListAccessibleDataAgentsPage, + ListAccessibleDataAgentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAccessibleDataAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAccessibleDataAgentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAccessibleDataAgentsPagedResponse(ListAccessibleDataAgentsPage page) { + super(page, ListAccessibleDataAgentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAccessibleDataAgentsPage + extends AbstractPage< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + DataAgent, + ListAccessibleDataAgentsPage> { + + private ListAccessibleDataAgentsPage( + PageContext + context, + ListAccessibleDataAgentsResponse response) { + super(context, response); + } + + private static ListAccessibleDataAgentsPage createEmptyPage() { + return new ListAccessibleDataAgentsPage(null, null); + } + + @Override + protected ListAccessibleDataAgentsPage createPage( + PageContext + context, + ListAccessibleDataAgentsResponse response) { + return new ListAccessibleDataAgentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAccessibleDataAgentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + DataAgent, + ListAccessibleDataAgentsPage, + ListAccessibleDataAgentsFixedSizeCollection> { + + private ListAccessibleDataAgentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAccessibleDataAgentsFixedSizeCollection createEmptyCollection() { + return new ListAccessibleDataAgentsFixedSizeCollection(null, 0); + } + + @Override + protected ListAccessibleDataAgentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAccessibleDataAgentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceSettings.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceSettings.java new file mode 100644 index 000000000000..0465064c0860 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceSettings.java @@ -0,0 +1,430 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.geminidataanalytics.v1.stub.DataAgentServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +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 DataAgentServiceClient}. + * + *

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

    + *
  • The default service address (geminidataanalytics.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDataAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceSettings.Builder dataAgentServiceSettingsBuilder =
+ *     DataAgentServiceSettings.newBuilder();
+ * dataAgentServiceSettingsBuilder
+ *     .getDataAgentSettings()
+ *     .setRetrySettings(
+ *         dataAgentServiceSettingsBuilder
+ *             .getDataAgentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataAgentServiceSettings dataAgentServiceSettings = dataAgentServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createDataAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceSettings.Builder dataAgentServiceSettingsBuilder =
+ *     DataAgentServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataAgentServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataAgentServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDataAgents. */ + public PagedCallSettings< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).listDataAgentsSettings(); + } + + /** Returns the object with the settings used for calls to listAccessibleDataAgents. */ + public PagedCallSettings< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).listAccessibleDataAgentsSettings(); + } + + /** Returns the object with the settings used for calls to getDataAgent. */ + public UnaryCallSettings getDataAgentSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).getDataAgentSettings(); + } + + /** Returns the object with the settings used for calls to createDataAgent. */ + public UnaryCallSettings createDataAgentSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).createDataAgentSettings(); + } + + /** Returns the object with the settings used for calls to createDataAgent. */ + public OperationCallSettings + createDataAgentOperationSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).createDataAgentOperationSettings(); + } + + /** Returns the object with the settings used for calls to createDataAgentSync. */ + public UnaryCallSettings createDataAgentSyncSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).createDataAgentSyncSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAgent. */ + public UnaryCallSettings updateDataAgentSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).updateDataAgentSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAgent. */ + public OperationCallSettings + updateDataAgentOperationSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).updateDataAgentOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAgentSync. */ + public UnaryCallSettings updateDataAgentSyncSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).updateDataAgentSyncSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAgent. */ + public UnaryCallSettings deleteDataAgentSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).deleteDataAgentSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAgent. */ + public OperationCallSettings + deleteDataAgentOperationSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).deleteDataAgentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAgentSync. */ + public UnaryCallSettings deleteDataAgentSyncSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).deleteDataAgentSyncSettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataAgentServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final DataAgentServiceSettings create(DataAgentServiceStubSettings stub) + throws IOException { + return new DataAgentServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataAgentServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataAgentServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataAgentServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataAgentServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataAgentServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataAgentServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataAgentServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataAgentServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 DataAgentServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataAgentServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataAgentServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataAgentServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataAgentServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataAgentServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(DataAgentServiceStubSettings.newHttpJsonBuilder()); + } + + public DataAgentServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataAgentServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listDataAgents. */ + public PagedCallSettings.Builder< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings() { + return getStubSettingsBuilder().listDataAgentsSettings(); + } + + /** Returns the builder for the settings used for calls to listAccessibleDataAgents. */ + public PagedCallSettings.Builder< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings() { + return getStubSettingsBuilder().listAccessibleDataAgentsSettings(); + } + + /** Returns the builder for the settings used for calls to getDataAgent. */ + public UnaryCallSettings.Builder getDataAgentSettings() { + return getStubSettingsBuilder().getDataAgentSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAgent. */ + public UnaryCallSettings.Builder createDataAgentSettings() { + return getStubSettingsBuilder().createDataAgentSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAgent. */ + public OperationCallSettings.Builder + createDataAgentOperationSettings() { + return getStubSettingsBuilder().createDataAgentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAgentSync. */ + public UnaryCallSettings.Builder + createDataAgentSyncSettings() { + return getStubSettingsBuilder().createDataAgentSyncSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAgent. */ + public UnaryCallSettings.Builder updateDataAgentSettings() { + return getStubSettingsBuilder().updateDataAgentSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAgent. */ + public OperationCallSettings.Builder + updateDataAgentOperationSettings() { + return getStubSettingsBuilder().updateDataAgentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAgentSync. */ + public UnaryCallSettings.Builder + updateDataAgentSyncSettings() { + return getStubSettingsBuilder().updateDataAgentSyncSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAgent. */ + public UnaryCallSettings.Builder deleteDataAgentSettings() { + return getStubSettingsBuilder().deleteDataAgentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAgent. */ + public OperationCallSettings.Builder + deleteDataAgentOperationSettings() { + return getStubSettingsBuilder().deleteDataAgentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAgentSync. */ + public UnaryCallSettings.Builder deleteDataAgentSyncSettings() { + return getStubSettingsBuilder().deleteDataAgentSyncSettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public DataAgentServiceSettings build() throws IOException { + return new DataAgentServiceSettings(this); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClient.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClient.java new file mode 100644 index 000000000000..4d7cf7e22424 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClient.java @@ -0,0 +1,1517 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStub; +import com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +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 to ask a natural language question on top of BigQuery and Looker + * Studio datasources to get back streamed responses of various kinds to help provide a rich + * conversational answer. + * + *

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
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Conversation conversation = Conversation.newBuilder().build();
+ *   String conversationId = "conversationId-1676095234";
+ *   Conversation response =
+ *       dataChatServiceClient.createConversation(parent, conversation, conversationId);
+ * }
+ * }
+ * + *

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

Chat

Answers a data question by generating a stream of [Message][google.cloud.geminidataanalytics.v1.Message] objects.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • chatCallable() + *

+ *

CreateConversation

Creates a new conversation to persist the conversation history. Each conversation will have multiple messages associated with it.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createConversation(CreateConversationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createConversation(LocationName parent, Conversation conversation, String conversationId) + *

  • createConversation(String parent, Conversation conversation, String conversationId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createConversationCallable() + *

+ *

DeleteConversation

Deletes a conversation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteConversation(DeleteConversationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteConversation(ConversationName name) + *

  • deleteConversation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteConversationCallable() + *

+ *

GetConversation

Gets details of a single conversation by using conversation id and parent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getConversation(GetConversationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getConversation(ConversationName name) + *

  • getConversation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getConversationCallable() + *

+ *

ListConversations

Lists all conversations for a given parent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listConversations(ListConversationsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listConversations(LocationName parent) + *

  • listConversations(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listConversationsPagedCallable() + *

  • listConversationsCallable() + *

+ *

ListMessages

Lists all messages for a given conversation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMessages(ListMessagesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listMessages(ConversationName parent) + *

  • listMessages(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listMessagesPagedCallable() + *

  • listMessagesCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 DataChatServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataChatServiceSettings dataChatServiceSettings =
+ *     DataChatServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataChatServiceClient dataChatServiceClient =
+ *     DataChatServiceClient.create(dataChatServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataChatServiceSettings dataChatServiceSettings =
+ *     DataChatServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataChatServiceClient dataChatServiceClient =
+ *     DataChatServiceClient.create(dataChatServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataChatServiceSettings dataChatServiceSettings =
+ *     DataChatServiceSettings.newHttpJsonBuilder().build();
+ * DataChatServiceClient dataChatServiceClient =
+ *     DataChatServiceClient.create(dataChatServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataChatServiceClient implements BackgroundResource { + private final DataChatServiceSettings settings; + private final DataChatServiceStub stub; + + /** Constructs an instance of DataChatServiceClient with default settings. */ + public static final DataChatServiceClient create() throws IOException { + return create(DataChatServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataChatServiceClient, 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 DataChatServiceClient create(DataChatServiceSettings settings) + throws IOException { + return new DataChatServiceClient(settings); + } + + /** + * Constructs an instance of DataChatServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(DataChatServiceSettings). + */ + public static final DataChatServiceClient create(DataChatServiceStub stub) { + return new DataChatServiceClient(stub); + } + + /** + * Constructs an instance of DataChatServiceClient, 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 DataChatServiceClient(DataChatServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataChatServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected DataChatServiceClient(DataChatServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DataChatServiceSettings getSettings() { + return settings; + } + + public DataChatServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Answers a data question by generating a stream of + * [Message][google.cloud.geminidataanalytics.v1.Message] objects. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ChatRequest request =
+   *       ChatRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .addAllMessages(new ArrayList())
+   *           .setCredentials(Credentials.newBuilder().build())
+   *           .build();
+   *   ServerStream stream = dataChatServiceClient.chatCallable().call(request);
+   *   for (Message response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable chatCallable() { + return stub.chatCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new conversation to persist the conversation history. Each conversation will have + * multiple messages associated with it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Conversation conversation = Conversation.newBuilder().build();
+   *   String conversationId = "conversationId-1676095234";
+   *   Conversation response =
+   *       dataChatServiceClient.createConversation(parent, conversation, conversationId);
+   * }
+   * }
+ * + * @param parent Required. Parent value for CreateConversationRequest. Format: + * `projects/{project}/locations/{location}` + * @param conversation Required. The conversation to create. + * @param conversationId Optional. The conversation id of the conversation to create. Must be + * unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If + * not provided, the server will auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation createConversation( + LocationName parent, Conversation conversation, String conversationId) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConversation(conversation) + .setConversationId(conversationId) + .build(); + return createConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new conversation to persist the conversation history. Each conversation will have + * multiple messages associated with it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Conversation conversation = Conversation.newBuilder().build();
+   *   String conversationId = "conversationId-1676095234";
+   *   Conversation response =
+   *       dataChatServiceClient.createConversation(parent, conversation, conversationId);
+   * }
+   * }
+ * + * @param parent Required. Parent value for CreateConversationRequest. Format: + * `projects/{project}/locations/{location}` + * @param conversation Required. The conversation to create. + * @param conversationId Optional. The conversation id of the conversation to create. Must be + * unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If + * not provided, the server will auto-generate a value for the id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation createConversation( + String parent, Conversation conversation, String conversationId) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(parent) + .setConversation(conversation) + .setConversationId(conversationId) + .build(); + return createConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new conversation to persist the conversation history. Each conversation will have + * multiple messages associated with it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   CreateConversationRequest request =
+   *       CreateConversationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setConversationId("conversationId-1676095234")
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Conversation response = dataChatServiceClient.createConversation(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 Conversation createConversation(CreateConversationRequest request) { + return createConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new conversation to persist the conversation history. Each conversation will have + * multiple messages associated with it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   CreateConversationRequest request =
+   *       CreateConversationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setConversationId("conversationId-1676095234")
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.createConversationCallable().futureCall(request);
+   *   // Do something.
+   *   Conversation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createConversationCallable() { + return stub.createConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
+   *   dataChatServiceClient.deleteConversation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversation(ConversationName name) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
+   *   dataChatServiceClient.deleteConversation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversation(String name) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder().setName(name).build(); + deleteConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   DeleteConversationRequest request =
+   *       DeleteConversationRequest.newBuilder()
+   *           .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .build();
+   *   dataChatServiceClient.deleteConversation(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 deleteConversation(DeleteConversationRequest request) { + deleteConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   DeleteConversationRequest request =
+   *       DeleteConversationRequest.newBuilder()
+   *           .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.deleteConversationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteConversationCallable() { + return stub.deleteConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single conversation by using conversation id and parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
+   *   Conversation response = dataChatServiceClient.getConversation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation getConversation(ConversationName name) { + GetConversationRequest request = + GetConversationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single conversation by using conversation id and parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
+   *   Conversation response = dataChatServiceClient.getConversation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation getConversation(String name) { + GetConversationRequest request = GetConversationRequest.newBuilder().setName(name).build(); + return getConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single conversation by using conversation id and parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   GetConversationRequest request =
+   *       GetConversationRequest.newBuilder()
+   *           .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .build();
+   *   Conversation response = dataChatServiceClient.getConversation(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 Conversation getConversation(GetConversationRequest request) { + return getConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single conversation by using conversation id and parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   GetConversationRequest request =
+   *       GetConversationRequest.newBuilder()
+   *           .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.getConversationCallable().futureCall(request);
+   *   // Do something.
+   *   Conversation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getConversationCallable() { + return stub.getConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all conversations for a given parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListConversationsRequest. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversationsPagedResponse listConversations(LocationName parent) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listConversations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all conversations for a given parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListConversationsRequest. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversationsPagedResponse listConversations(String parent) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder().setParent(parent).build(); + return listConversations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all conversations for a given parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Conversation element : dataChatServiceClient.listConversations(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 ListConversationsPagedResponse listConversations(ListConversationsRequest request) { + return listConversationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all conversations for a given parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.listConversationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Conversation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversationsPagedCallable() { + return stub.listConversationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all conversations for a given parent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListConversationsResponse response =
+   *         dataChatServiceClient.listConversationsCallable().call(request);
+   *     for (Conversation element : response.getConversationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversationsCallable() { + return stub.listConversationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all messages for a given conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
+   *   for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The conversation to list messages under. Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMessagesPagedResponse listMessages(ConversationName parent) { + ListMessagesRequest request = + ListMessagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMessages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all messages for a given conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   String parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
+   *   for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The conversation to list messages under. Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMessagesPagedResponse listMessages(String parent) { + ListMessagesRequest request = ListMessagesRequest.newBuilder().setParent(parent).build(); + return listMessages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all messages for a given conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListMessagesRequest request =
+   *       ListMessagesRequest.newBuilder()
+   *           .setParent(
+   *               ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (StorageMessage element : dataChatServiceClient.listMessages(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 ListMessagesPagedResponse listMessages(ListMessagesRequest request) { + return listMessagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all messages for a given conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListMessagesRequest request =
+   *       ListMessagesRequest.newBuilder()
+   *           .setParent(
+   *               ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.listMessagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (StorageMessage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMessagesPagedCallable() { + return stub.listMessagesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all messages for a given conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListMessagesRequest request =
+   *       ListMessagesRequest.newBuilder()
+   *           .setParent(
+   *               ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListMessagesResponse response = dataChatServiceClient.listMessagesCallable().call(request);
+   *     for (StorageMessage element : response.getMessagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listMessagesCallable() { + return stub.listMessagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataChatServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataChatServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataChatServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataChatServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataChatServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListConversationsPagedResponse + extends AbstractPagedListResponse< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage, + ListConversationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConversationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListConversationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListConversationsPagedResponse(ListConversationsPage page) { + super(page, ListConversationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConversationsPage + extends AbstractPage< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage> { + + private ListConversationsPage( + PageContext context, + ListConversationsResponse response) { + super(context, response); + } + + private static ListConversationsPage createEmptyPage() { + return new ListConversationsPage(null, null); + } + + @Override + protected ListConversationsPage createPage( + PageContext context, + ListConversationsResponse response) { + return new ListConversationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConversationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage, + ListConversationsFixedSizeCollection> { + + private ListConversationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConversationsFixedSizeCollection createEmptyCollection() { + return new ListConversationsFixedSizeCollection(null, 0); + } + + @Override + protected ListConversationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConversationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMessagesPagedResponse + extends AbstractPagedListResponse< + ListMessagesRequest, + ListMessagesResponse, + StorageMessage, + ListMessagesPage, + ListMessagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMessagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMessagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMessagesPagedResponse(ListMessagesPage page) { + super(page, ListMessagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMessagesPage + extends AbstractPage< + ListMessagesRequest, ListMessagesResponse, StorageMessage, ListMessagesPage> { + + private ListMessagesPage( + PageContext context, + ListMessagesResponse response) { + super(context, response); + } + + private static ListMessagesPage createEmptyPage() { + return new ListMessagesPage(null, null); + } + + @Override + protected ListMessagesPage createPage( + PageContext context, + ListMessagesResponse response) { + return new ListMessagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMessagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMessagesRequest, + ListMessagesResponse, + StorageMessage, + ListMessagesPage, + ListMessagesFixedSizeCollection> { + + private ListMessagesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMessagesFixedSizeCollection createEmptyCollection() { + return new ListMessagesFixedSizeCollection(null, 0); + } + + @Override + protected ListMessagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMessagesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceSettings.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceSettings.java new file mode 100644 index 000000000000..b789b86947f3 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceSettings.java @@ -0,0 +1,310 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 DataChatServiceClient}. + * + *

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

    + *
  • The default service address (geminidataanalytics.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createConversation: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataChatServiceSettings.Builder dataChatServiceSettingsBuilder =
+ *     DataChatServiceSettings.newBuilder();
+ * dataChatServiceSettingsBuilder
+ *     .createConversationSettings()
+ *     .setRetrySettings(
+ *         dataChatServiceSettingsBuilder
+ *             .createConversationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataChatServiceSettings dataChatServiceSettings = dataChatServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class DataChatServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to chat. */ + public ServerStreamingCallSettings chatSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).chatSettings(); + } + + /** Returns the object with the settings used for calls to createConversation. */ + public UnaryCallSettings createConversationSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).createConversationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConversation. */ + public UnaryCallSettings deleteConversationSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).deleteConversationSettings(); + } + + /** Returns the object with the settings used for calls to getConversation. */ + public UnaryCallSettings getConversationSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).getConversationSettings(); + } + + /** Returns the object with the settings used for calls to listConversations. */ + public PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).listConversationsSettings(); + } + + /** Returns the object with the settings used for calls to listMessages. */ + public PagedCallSettings + listMessagesSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).listMessagesSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataChatServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final DataChatServiceSettings create(DataChatServiceStubSettings stub) + throws IOException { + return new DataChatServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataChatServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataChatServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataChatServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataChatServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataChatServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataChatServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataChatServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataChatServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 DataChatServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataChatServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataChatServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataChatServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataChatServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataChatServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(DataChatServiceStubSettings.newHttpJsonBuilder()); + } + + public DataChatServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataChatServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to chat. */ + public ServerStreamingCallSettings.Builder chatSettings() { + return getStubSettingsBuilder().chatSettings(); + } + + /** Returns the builder for the settings used for calls to createConversation. */ + public UnaryCallSettings.Builder + createConversationSettings() { + return getStubSettingsBuilder().createConversationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConversation. */ + public UnaryCallSettings.Builder + deleteConversationSettings() { + return getStubSettingsBuilder().deleteConversationSettings(); + } + + /** Returns the builder for the settings used for calls to getConversation. */ + public UnaryCallSettings.Builder + getConversationSettings() { + return getStubSettingsBuilder().getConversationSettings(); + } + + /** Returns the builder for the settings used for calls to listConversations. */ + public PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return getStubSettingsBuilder().listConversationsSettings(); + } + + /** Returns the builder for the settings used for calls to listMessages. */ + public PagedCallSettings.Builder< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> + listMessagesSettings() { + return getStubSettingsBuilder().listMessagesSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public DataChatServiceSettings build() throws IOException { + return new DataChatServiceSettings(this); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/gapic_metadata.json b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/gapic_metadata.json new file mode 100644 index 000000000000..18a29a44cdce --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/gapic_metadata.json @@ -0,0 +1,90 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.geminidataanalytics.v1", + "libraryPackage": "com.google.cloud.geminidataanalytics.v1", + "services": { + "DataAgentService": { + "clients": { + "grpc": { + "libraryClient": "DataAgentServiceClient", + "rpcs": { + "CreateDataAgent": { + "methods": ["createDataAgentAsync", "createDataAgentAsync", "createDataAgentAsync", "createDataAgentOperationCallable", "createDataAgentCallable"] + }, + "CreateDataAgentSync": { + "methods": ["createDataAgentSync", "createDataAgentSync", "createDataAgentSync", "createDataAgentSyncCallable"] + }, + "DeleteDataAgent": { + "methods": ["deleteDataAgentAsync", "deleteDataAgentAsync", "deleteDataAgentAsync", "deleteDataAgentOperationCallable", "deleteDataAgentCallable"] + }, + "DeleteDataAgentSync": { + "methods": ["deleteDataAgentSync", "deleteDataAgentSync", "deleteDataAgentSync", "deleteDataAgentSyncCallable"] + }, + "GetDataAgent": { + "methods": ["getDataAgent", "getDataAgent", "getDataAgent", "getDataAgentCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListAccessibleDataAgents": { + "methods": ["listAccessibleDataAgents", "listAccessibleDataAgents", "listAccessibleDataAgents", "listAccessibleDataAgentsPagedCallable", "listAccessibleDataAgentsCallable"] + }, + "ListDataAgents": { + "methods": ["listDataAgents", "listDataAgents", "listDataAgents", "listDataAgentsPagedCallable", "listDataAgentsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, + "UpdateDataAgent": { + "methods": ["updateDataAgentAsync", "updateDataAgentAsync", "updateDataAgentOperationCallable", "updateDataAgentCallable"] + }, + "UpdateDataAgentSync": { + "methods": ["updateDataAgentSync", "updateDataAgentSync", "updateDataAgentSyncCallable"] + } + } + } + } + }, + "DataChatService": { + "clients": { + "grpc": { + "libraryClient": "DataChatServiceClient", + "rpcs": { + "Chat": { + "methods": ["chatCallable"] + }, + "CreateConversation": { + "methods": ["createConversation", "createConversation", "createConversation", "createConversationCallable"] + }, + "DeleteConversation": { + "methods": ["deleteConversation", "deleteConversation", "deleteConversation", "deleteConversationCallable"] + }, + "GetConversation": { + "methods": ["getConversation", "getConversation", "getConversation", "getConversationCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListConversations": { + "methods": ["listConversations", "listConversations", "listConversations", "listConversationsPagedCallable", "listConversationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMessages": { + "methods": ["listMessages", "listMessages", "listMessages", "listMessagesPagedCallable", "listMessagesCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/package-info.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/package-info.java new file mode 100644 index 000000000000..6ae10ad307e6 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/package-info.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Data Analytics API with Gemini + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= DataAgentServiceClient ======================= + * + *

Service Description: Service describing handlers for resources. + * + *

Sample for DataAgentServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
+ *   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
+ *   DataAgent response = dataAgentServiceClient.getDataAgent(name);
+ * }
+ * }
+ * + *

======================= DataChatServiceClient ======================= + * + *

Service Description: Service to ask a natural language question on top of BigQuery and Looker + * Studio datasources to get back streamed responses of various kinds to help provide a rich + * conversational answer. + * + *

Sample for DataChatServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Conversation conversation = Conversation.newBuilder().build();
+ *   String conversationId = "conversationId-1676095234";
+ *   Conversation response =
+ *       dataChatServiceClient.createConversation(parent, conversation, conversationId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.geminidataanalytics.v1; + +import javax.annotation.Generated; diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStub.java new file mode 100644 index 000000000000..45710752c368 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStub.java @@ -0,0 +1,151 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +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.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +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 DataAgentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataAgentServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listDataAgentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataAgentsPagedCallable()"); + } + + public UnaryCallable listDataAgentsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataAgentsCallable()"); + } + + public UnaryCallable + listAccessibleDataAgentsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAccessibleDataAgentsPagedCallable()"); + } + + public UnaryCallable + listAccessibleDataAgentsCallable() { + throw new UnsupportedOperationException("Not implemented: listAccessibleDataAgentsCallable()"); + } + + public UnaryCallable getDataAgentCallable() { + throw new UnsupportedOperationException("Not implemented: getDataAgentCallable()"); + } + + public OperationCallable + createDataAgentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createDataAgentOperationCallable()"); + } + + public UnaryCallable createDataAgentCallable() { + throw new UnsupportedOperationException("Not implemented: createDataAgentCallable()"); + } + + public UnaryCallable createDataAgentSyncCallable() { + throw new UnsupportedOperationException("Not implemented: createDataAgentSyncCallable()"); + } + + public OperationCallable + updateDataAgentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataAgentOperationCallable()"); + } + + public UnaryCallable updateDataAgentCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataAgentCallable()"); + } + + public UnaryCallable updateDataAgentSyncCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataAgentSyncCallable()"); + } + + public OperationCallable + deleteDataAgentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataAgentOperationCallable()"); + } + + public UnaryCallable deleteDataAgentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataAgentCallable()"); + } + + public UnaryCallable deleteDataAgentSyncCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataAgentSyncCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStubSettings.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStubSettings.java new file mode 100644 index 000000000000..700b20b60676 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataAgentServiceStubSettings.java @@ -0,0 +1,1019 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.LibraryMetadata; +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.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataAgentServiceStub}. + * + *

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

    + *
  • The default service address (geminidataanalytics.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDataAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceStubSettings.Builder dataAgentServiceSettingsBuilder =
+ *     DataAgentServiceStubSettings.newBuilder();
+ * dataAgentServiceSettingsBuilder
+ *     .getDataAgentSettings()
+ *     .setRetrySettings(
+ *         dataAgentServiceSettingsBuilder
+ *             .getDataAgentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataAgentServiceStubSettings dataAgentServiceSettings = dataAgentServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createDataAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataAgentServiceStubSettings.Builder dataAgentServiceSettingsBuilder =
+ *     DataAgentServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataAgentServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class DataAgentServiceStubSettings 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").build(); + + private final PagedCallSettings< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings; + private final PagedCallSettings< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings; + private final UnaryCallSettings getDataAgentSettings; + private final UnaryCallSettings createDataAgentSettings; + private final OperationCallSettings + createDataAgentOperationSettings; + private final UnaryCallSettings createDataAgentSyncSettings; + private final UnaryCallSettings updateDataAgentSettings; + private final OperationCallSettings + updateDataAgentOperationSettings; + private final UnaryCallSettings updateDataAgentSyncSettings; + private final UnaryCallSettings deleteDataAgentSettings; + private final OperationCallSettings + deleteDataAgentOperationSettings; + private final UnaryCallSettings deleteDataAgentSyncSettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings setIamPolicySettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_DATA_AGENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataAgentsRequest injectToken(ListDataAgentsRequest payload, String token) { + return ListDataAgentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataAgentsRequest injectPageSize( + ListDataAgentsRequest payload, int pageSize) { + return ListDataAgentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataAgentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataAgentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataAgentsResponse payload) { + return payload.getDataAgentsList(); + } + }; + + private static final PagedListDescriptor< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsResponse, DataAgent> + LIST_ACCESSIBLE_DATA_AGENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsResponse, DataAgent>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAccessibleDataAgentsRequest injectToken( + ListAccessibleDataAgentsRequest payload, String token) { + return ListAccessibleDataAgentsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAccessibleDataAgentsRequest injectPageSize( + ListAccessibleDataAgentsRequest payload, int pageSize) { + return ListAccessibleDataAgentsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAccessibleDataAgentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAccessibleDataAgentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAccessibleDataAgentsResponse payload) { + return payload.getDataAgentsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + LIST_DATA_AGENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataAgentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_AGENTS_PAGE_STR_DESC, request, context); + return ListDataAgentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + LIST_ACCESSIBLE_DATA_AGENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAccessibleDataAgentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsResponse, DataAgent> + pageContext = + PageContext.create( + callable, LIST_ACCESSIBLE_DATA_AGENTS_PAGE_STR_DESC, request, context); + return ListAccessibleDataAgentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDataAgents. */ + public PagedCallSettings< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings() { + return listDataAgentsSettings; + } + + /** Returns the object with the settings used for calls to listAccessibleDataAgents. */ + public PagedCallSettings< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings() { + return listAccessibleDataAgentsSettings; + } + + /** Returns the object with the settings used for calls to getDataAgent. */ + public UnaryCallSettings getDataAgentSettings() { + return getDataAgentSettings; + } + + /** Returns the object with the settings used for calls to createDataAgent. */ + public UnaryCallSettings createDataAgentSettings() { + return createDataAgentSettings; + } + + /** Returns the object with the settings used for calls to createDataAgent. */ + public OperationCallSettings + createDataAgentOperationSettings() { + return createDataAgentOperationSettings; + } + + /** Returns the object with the settings used for calls to createDataAgentSync. */ + public UnaryCallSettings createDataAgentSyncSettings() { + return createDataAgentSyncSettings; + } + + /** Returns the object with the settings used for calls to updateDataAgent. */ + public UnaryCallSettings updateDataAgentSettings() { + return updateDataAgentSettings; + } + + /** Returns the object with the settings used for calls to updateDataAgent. */ + public OperationCallSettings + updateDataAgentOperationSettings() { + return updateDataAgentOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDataAgentSync. */ + public UnaryCallSettings updateDataAgentSyncSettings() { + return updateDataAgentSyncSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAgent. */ + public UnaryCallSettings deleteDataAgentSettings() { + return deleteDataAgentSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAgent. */ + public OperationCallSettings + deleteDataAgentOperationSettings() { + return deleteDataAgentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAgentSync. */ + public UnaryCallSettings deleteDataAgentSyncSettings() { + return deleteDataAgentSyncSettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public DataAgentServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataAgentServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataAgentServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "geminidataanalytics"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "geminidataanalytics.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "geminidataanalytics.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataAgentServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataAgentServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataAgentServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 DataAgentServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDataAgentsSettings = settingsBuilder.listDataAgentsSettings().build(); + listAccessibleDataAgentsSettings = settingsBuilder.listAccessibleDataAgentsSettings().build(); + getDataAgentSettings = settingsBuilder.getDataAgentSettings().build(); + createDataAgentSettings = settingsBuilder.createDataAgentSettings().build(); + createDataAgentOperationSettings = settingsBuilder.createDataAgentOperationSettings().build(); + createDataAgentSyncSettings = settingsBuilder.createDataAgentSyncSettings().build(); + updateDataAgentSettings = settingsBuilder.updateDataAgentSettings().build(); + updateDataAgentOperationSettings = settingsBuilder.updateDataAgentOperationSettings().build(); + updateDataAgentSyncSettings = settingsBuilder.updateDataAgentSyncSettings().build(); + deleteDataAgentSettings = settingsBuilder.deleteDataAgentSettings().build(); + deleteDataAgentOperationSettings = settingsBuilder.deleteDataAgentOperationSettings().build(); + deleteDataAgentSyncSettings = settingsBuilder.deleteDataAgentSyncSettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-geminidataanalytics") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for DataAgentServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings; + private final PagedCallSettings.Builder< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings; + private final UnaryCallSettings.Builder getDataAgentSettings; + private final UnaryCallSettings.Builder + createDataAgentSettings; + private final OperationCallSettings.Builder< + CreateDataAgentRequest, DataAgent, OperationMetadata> + createDataAgentOperationSettings; + private final UnaryCallSettings.Builder + createDataAgentSyncSettings; + private final UnaryCallSettings.Builder + updateDataAgentSettings; + private final OperationCallSettings.Builder< + UpdateDataAgentRequest, DataAgent, OperationMetadata> + updateDataAgentOperationSettings; + private final UnaryCallSettings.Builder + updateDataAgentSyncSettings; + private final UnaryCallSettings.Builder + deleteDataAgentSettings; + private final OperationCallSettings.Builder + deleteDataAgentOperationSettings; + private final UnaryCallSettings.Builder + deleteDataAgentSyncSettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + 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() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listDataAgentsSettings = PagedCallSettings.newBuilder(LIST_DATA_AGENTS_PAGE_STR_FACT); + listAccessibleDataAgentsSettings = + PagedCallSettings.newBuilder(LIST_ACCESSIBLE_DATA_AGENTS_PAGE_STR_FACT); + getDataAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAgentOperationSettings = OperationCallSettings.newBuilder(); + createDataAgentSyncSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataAgentOperationSettings = OperationCallSettings.newBuilder(); + updateDataAgentSyncSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataAgentOperationSettings = OperationCallSettings.newBuilder(); + deleteDataAgentSyncSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDataAgentsSettings, + listAccessibleDataAgentsSettings, + getDataAgentSettings, + createDataAgentSettings, + createDataAgentSyncSettings, + updateDataAgentSettings, + updateDataAgentSyncSettings, + deleteDataAgentSettings, + deleteDataAgentSyncSettings, + getIamPolicySettings, + setIamPolicySettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(DataAgentServiceStubSettings settings) { + super(settings); + + listDataAgentsSettings = settings.listDataAgentsSettings.toBuilder(); + listAccessibleDataAgentsSettings = settings.listAccessibleDataAgentsSettings.toBuilder(); + getDataAgentSettings = settings.getDataAgentSettings.toBuilder(); + createDataAgentSettings = settings.createDataAgentSettings.toBuilder(); + createDataAgentOperationSettings = settings.createDataAgentOperationSettings.toBuilder(); + createDataAgentSyncSettings = settings.createDataAgentSyncSettings.toBuilder(); + updateDataAgentSettings = settings.updateDataAgentSettings.toBuilder(); + updateDataAgentOperationSettings = settings.updateDataAgentOperationSettings.toBuilder(); + updateDataAgentSyncSettings = settings.updateDataAgentSyncSettings.toBuilder(); + deleteDataAgentSettings = settings.deleteDataAgentSettings.toBuilder(); + deleteDataAgentOperationSettings = settings.deleteDataAgentOperationSettings.toBuilder(); + deleteDataAgentSyncSettings = settings.deleteDataAgentSyncSettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDataAgentsSettings, + listAccessibleDataAgentsSettings, + getDataAgentSettings, + createDataAgentSettings, + createDataAgentSyncSettings, + updateDataAgentSettings, + updateDataAgentSyncSettings, + deleteDataAgentSettings, + deleteDataAgentSyncSettings, + getIamPolicySettings, + setIamPolicySettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listDataAgentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAccessibleDataAgentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataAgentSyncSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDataAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDataAgentSyncSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDataAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDataAgentSyncSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataAgentOperationSettings() + .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(DataAgent.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateDataAgentOperationSettings() + .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(DataAgent.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteDataAgentOperationSettings() + .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(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listDataAgents. */ + public PagedCallSettings.Builder< + ListDataAgentsRequest, ListDataAgentsResponse, ListDataAgentsPagedResponse> + listDataAgentsSettings() { + return listDataAgentsSettings; + } + + /** Returns the builder for the settings used for calls to listAccessibleDataAgents. */ + public PagedCallSettings.Builder< + ListAccessibleDataAgentsRequest, + ListAccessibleDataAgentsResponse, + ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsSettings() { + return listAccessibleDataAgentsSettings; + } + + /** Returns the builder for the settings used for calls to getDataAgent. */ + public UnaryCallSettings.Builder getDataAgentSettings() { + return getDataAgentSettings; + } + + /** Returns the builder for the settings used for calls to createDataAgent. */ + public UnaryCallSettings.Builder createDataAgentSettings() { + return createDataAgentSettings; + } + + /** Returns the builder for the settings used for calls to createDataAgent. */ + public OperationCallSettings.Builder + createDataAgentOperationSettings() { + return createDataAgentOperationSettings; + } + + /** Returns the builder for the settings used for calls to createDataAgentSync. */ + public UnaryCallSettings.Builder + createDataAgentSyncSettings() { + return createDataAgentSyncSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAgent. */ + public UnaryCallSettings.Builder updateDataAgentSettings() { + return updateDataAgentSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAgent. */ + public OperationCallSettings.Builder + updateDataAgentOperationSettings() { + return updateDataAgentOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAgentSync. */ + public UnaryCallSettings.Builder + updateDataAgentSyncSettings() { + return updateDataAgentSyncSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAgent. */ + public UnaryCallSettings.Builder deleteDataAgentSettings() { + return deleteDataAgentSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAgent. */ + public OperationCallSettings.Builder + deleteDataAgentOperationSettings() { + return deleteDataAgentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAgentSync. */ + public UnaryCallSettings.Builder deleteDataAgentSyncSettings() { + return deleteDataAgentSyncSettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public DataAgentServiceStubSettings build() throws IOException { + return new DataAgentServiceStubSettings(this); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStub.java new file mode 100644 index 000000000000..1758b2be2ed8 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStub.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.ChatRequest; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsResponse; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.ListMessagesResponse; +import com.google.cloud.geminidataanalytics.v1.Message; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataChatService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataChatServiceStub implements BackgroundResource { + + public ServerStreamingCallable chatCallable() { + throw new UnsupportedOperationException("Not implemented: chatCallable()"); + } + + public UnaryCallable createConversationCallable() { + throw new UnsupportedOperationException("Not implemented: createConversationCallable()"); + } + + public UnaryCallable deleteConversationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConversationCallable()"); + } + + public UnaryCallable getConversationCallable() { + throw new UnsupportedOperationException("Not implemented: getConversationCallable()"); + } + + public UnaryCallable + listConversationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listConversationsPagedCallable()"); + } + + public UnaryCallable + listConversationsCallable() { + throw new UnsupportedOperationException("Not implemented: listConversationsCallable()"); + } + + public UnaryCallable listMessagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMessagesPagedCallable()"); + } + + public UnaryCallable listMessagesCallable() { + throw new UnsupportedOperationException("Not implemented: listMessagesCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStubSettings.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStubSettings.java new file mode 100644 index 000000000000..f3983a6ae328 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/DataChatServiceStubSettings.java @@ -0,0 +1,725 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.LibraryMetadata; +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.ServerStreamingCallSettings; +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.geminidataanalytics.v1.ChatRequest; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsResponse; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.ListMessagesResponse; +import com.google.cloud.geminidataanalytics.v1.Message; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataChatServiceStub}. + * + *

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

    + *
  • The default service address (geminidataanalytics.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createConversation: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataChatServiceStubSettings.Builder dataChatServiceSettingsBuilder =
+ *     DataChatServiceStubSettings.newBuilder();
+ * dataChatServiceSettingsBuilder
+ *     .createConversationSettings()
+ *     .setRetrySettings(
+ *         dataChatServiceSettingsBuilder
+ *             .createConversationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataChatServiceStubSettings dataChatServiceSettings = dataChatServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class DataChatServiceStubSettings 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").build(); + + private final ServerStreamingCallSettings chatSettings; + private final UnaryCallSettings + createConversationSettings; + private final UnaryCallSettings deleteConversationSettings; + private final UnaryCallSettings getConversationSettings; + private final PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings; + private final PagedCallSettings< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> + listMessagesSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor< + ListConversationsRequest, ListConversationsResponse, Conversation> + LIST_CONVERSATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConversationsRequest, ListConversationsResponse, Conversation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConversationsRequest injectToken( + ListConversationsRequest payload, String token) { + return ListConversationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConversationsRequest injectPageSize( + ListConversationsRequest payload, int pageSize) { + return ListConversationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConversationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConversationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListConversationsResponse payload) { + return payload.getConversationsList(); + } + }; + + private static final PagedListDescriptor< + ListMessagesRequest, ListMessagesResponse, StorageMessage> + LIST_MESSAGES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMessagesRequest injectToken(ListMessagesRequest payload, String token) { + return ListMessagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMessagesRequest injectPageSize(ListMessagesRequest payload, int pageSize) { + return ListMessagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMessagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMessagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMessagesResponse payload) { + return payload.getMessagesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + LIST_CONVERSATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConversationsRequest, + ListConversationsResponse, + ListConversationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConversationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CONVERSATIONS_PAGE_STR_DESC, request, context); + return ListConversationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> + LIST_MESSAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMessagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MESSAGES_PAGE_STR_DESC, request, context); + return ListMessagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to chat. */ + public ServerStreamingCallSettings chatSettings() { + return chatSettings; + } + + /** Returns the object with the settings used for calls to createConversation. */ + public UnaryCallSettings createConversationSettings() { + return createConversationSettings; + } + + /** Returns the object with the settings used for calls to deleteConversation. */ + public UnaryCallSettings deleteConversationSettings() { + return deleteConversationSettings; + } + + /** Returns the object with the settings used for calls to getConversation. */ + public UnaryCallSettings getConversationSettings() { + return getConversationSettings; + } + + /** Returns the object with the settings used for calls to listConversations. */ + public PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return listConversationsSettings; + } + + /** Returns the object with the settings used for calls to listMessages. */ + public PagedCallSettings + listMessagesSettings() { + return listMessagesSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public DataChatServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataChatServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataChatServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "geminidataanalytics"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "geminidataanalytics.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "geminidataanalytics.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataChatServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataChatServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataChatServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 DataChatServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + chatSettings = settingsBuilder.chatSettings().build(); + createConversationSettings = settingsBuilder.createConversationSettings().build(); + deleteConversationSettings = settingsBuilder.deleteConversationSettings().build(); + getConversationSettings = settingsBuilder.getConversationSettings().build(); + listConversationsSettings = settingsBuilder.listConversationsSettings().build(); + listMessagesSettings = settingsBuilder.listMessagesSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-geminidataanalytics") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for DataChatServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final ServerStreamingCallSettings.Builder chatSettings; + private final UnaryCallSettings.Builder + createConversationSettings; + private final UnaryCallSettings.Builder + deleteConversationSettings; + private final UnaryCallSettings.Builder + getConversationSettings; + private final PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings; + private final PagedCallSettings.Builder< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> + listMessagesSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + 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() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + chatSettings = ServerStreamingCallSettings.newBuilder(); + createConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listConversationsSettings = PagedCallSettings.newBuilder(LIST_CONVERSATIONS_PAGE_STR_FACT); + listMessagesSettings = PagedCallSettings.newBuilder(LIST_MESSAGES_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createConversationSettings, + deleteConversationSettings, + getConversationSettings, + listConversationsSettings, + listMessagesSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(DataChatServiceStubSettings settings) { + super(settings); + + chatSettings = settings.chatSettings.toBuilder(); + createConversationSettings = settings.createConversationSettings.toBuilder(); + deleteConversationSettings = settings.deleteConversationSettings.toBuilder(); + getConversationSettings = settings.getConversationSettings.toBuilder(); + listConversationsSettings = settings.listConversationsSettings.toBuilder(); + listMessagesSettings = settings.listMessagesSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createConversationSettings, + deleteConversationSettings, + getConversationSettings, + listConversationsSettings, + listMessagesSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .chatSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listConversationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listMessagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to chat. */ + public ServerStreamingCallSettings.Builder chatSettings() { + return chatSettings; + } + + /** Returns the builder for the settings used for calls to createConversation. */ + public UnaryCallSettings.Builder + createConversationSettings() { + return createConversationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConversation. */ + public UnaryCallSettings.Builder + deleteConversationSettings() { + return deleteConversationSettings; + } + + /** Returns the builder for the settings used for calls to getConversation. */ + public UnaryCallSettings.Builder + getConversationSettings() { + return getConversationSettings; + } + + /** Returns the builder for the settings used for calls to listConversations. */ + public PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return listConversationsSettings; + } + + /** Returns the builder for the settings used for calls to listMessages. */ + public PagedCallSettings.Builder< + ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> + listMessagesSettings() { + return listMessagesSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public DataChatServiceStubSettings build() throws IOException { + return new DataChatServiceStubSettings(this); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceCallableFactory.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceCallableFactory.java new file mode 100644 index 000000000000..c41bd647b2e8 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.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 DataAgentService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataAgentServiceCallableFactory 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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceStub.java new file mode 100644 index 000000000000..08b3295bd110 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataAgentServiceStub.java @@ -0,0 +1,652 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +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.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataAgentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataAgentServiceStub extends DataAgentServiceStub { + private static final MethodDescriptor + listDataAgentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/ListDataAgents") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataAgentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsResponse> + listAccessibleDataAgentsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/ListAccessibleDataAgents") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAccessibleDataAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAccessibleDataAgentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getDataAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/GetDataAgent") + .setRequestMarshaller(ProtoUtils.marshaller(GetDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataAgent.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createDataAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/CreateDataAgent") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createDataAgentSyncMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/CreateDataAgentSync") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataAgent.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateDataAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/UpdateDataAgent") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateDataAgentSyncMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/UpdateDataAgentSync") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataAgent.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteDataAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/DeleteDataAgent") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteDataAgentSyncMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/DeleteDataAgentSync") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataAgentService/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataAgentService/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable listDataAgentsCallable; + private final UnaryCallable + listDataAgentsPagedCallable; + private final UnaryCallable + listAccessibleDataAgentsCallable; + private final UnaryCallable< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsPagedCallable; + private final UnaryCallable getDataAgentCallable; + private final UnaryCallable createDataAgentCallable; + private final OperationCallable + createDataAgentOperationCallable; + private final UnaryCallable createDataAgentSyncCallable; + private final UnaryCallable updateDataAgentCallable; + private final OperationCallable + updateDataAgentOperationCallable; + private final UnaryCallable updateDataAgentSyncCallable; + private final UnaryCallable deleteDataAgentCallable; + private final OperationCallable + deleteDataAgentOperationCallable; + private final UnaryCallable deleteDataAgentSyncCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataAgentServiceStub create(DataAgentServiceStubSettings settings) + throws IOException { + return new GrpcDataAgentServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataAgentServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataAgentServiceStub( + DataAgentServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataAgentServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataAgentServiceStub( + DataAgentServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataAgentServiceStub, 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 GrpcDataAgentServiceStub( + DataAgentServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataAgentServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataAgentServiceStub, 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 GrpcDataAgentServiceStub( + DataAgentServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listDataAgentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataAgentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + listAccessibleDataAgentsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAccessibleDataAgentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getDataAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataAgentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createDataAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataAgentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createDataAgentSyncTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataAgentSyncMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateDataAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataAgentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_agent.name", String.valueOf(request.getDataAgent().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDataAgentSyncTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataAgentSyncMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_agent.name", String.valueOf(request.getDataAgent().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDataAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAgentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings deleteDataAgentSyncTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAgentSyncMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listDataAgentsCallable = + callableFactory.createUnaryCallable( + listDataAgentsTransportSettings, settings.listDataAgentsSettings(), clientContext); + this.listDataAgentsPagedCallable = + callableFactory.createPagedCallable( + listDataAgentsTransportSettings, settings.listDataAgentsSettings(), clientContext); + this.listAccessibleDataAgentsCallable = + callableFactory.createUnaryCallable( + listAccessibleDataAgentsTransportSettings, + settings.listAccessibleDataAgentsSettings(), + clientContext); + this.listAccessibleDataAgentsPagedCallable = + callableFactory.createPagedCallable( + listAccessibleDataAgentsTransportSettings, + settings.listAccessibleDataAgentsSettings(), + clientContext); + this.getDataAgentCallable = + callableFactory.createUnaryCallable( + getDataAgentTransportSettings, settings.getDataAgentSettings(), clientContext); + this.createDataAgentCallable = + callableFactory.createUnaryCallable( + createDataAgentTransportSettings, settings.createDataAgentSettings(), clientContext); + this.createDataAgentOperationCallable = + callableFactory.createOperationCallable( + createDataAgentTransportSettings, + settings.createDataAgentOperationSettings(), + clientContext, + operationsStub); + this.createDataAgentSyncCallable = + callableFactory.createUnaryCallable( + createDataAgentSyncTransportSettings, + settings.createDataAgentSyncSettings(), + clientContext); + this.updateDataAgentCallable = + callableFactory.createUnaryCallable( + updateDataAgentTransportSettings, settings.updateDataAgentSettings(), clientContext); + this.updateDataAgentOperationCallable = + callableFactory.createOperationCallable( + updateDataAgentTransportSettings, + settings.updateDataAgentOperationSettings(), + clientContext, + operationsStub); + this.updateDataAgentSyncCallable = + callableFactory.createUnaryCallable( + updateDataAgentSyncTransportSettings, + settings.updateDataAgentSyncSettings(), + clientContext); + this.deleteDataAgentCallable = + callableFactory.createUnaryCallable( + deleteDataAgentTransportSettings, settings.deleteDataAgentSettings(), clientContext); + this.deleteDataAgentOperationCallable = + callableFactory.createOperationCallable( + deleteDataAgentTransportSettings, + settings.deleteDataAgentOperationSettings(), + clientContext, + operationsStub); + this.deleteDataAgentSyncCallable = + callableFactory.createUnaryCallable( + deleteDataAgentSyncTransportSettings, + settings.deleteDataAgentSyncSettings(), + clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listDataAgentsCallable() { + return listDataAgentsCallable; + } + + @Override + public UnaryCallable + listDataAgentsPagedCallable() { + return listDataAgentsPagedCallable; + } + + @Override + public UnaryCallable + listAccessibleDataAgentsCallable() { + return listAccessibleDataAgentsCallable; + } + + @Override + public UnaryCallable + listAccessibleDataAgentsPagedCallable() { + return listAccessibleDataAgentsPagedCallable; + } + + @Override + public UnaryCallable getDataAgentCallable() { + return getDataAgentCallable; + } + + @Override + public UnaryCallable createDataAgentCallable() { + return createDataAgentCallable; + } + + @Override + public OperationCallable + createDataAgentOperationCallable() { + return createDataAgentOperationCallable; + } + + @Override + public UnaryCallable createDataAgentSyncCallable() { + return createDataAgentSyncCallable; + } + + @Override + public UnaryCallable updateDataAgentCallable() { + return updateDataAgentCallable; + } + + @Override + public OperationCallable + updateDataAgentOperationCallable() { + return updateDataAgentOperationCallable; + } + + @Override + public UnaryCallable updateDataAgentSyncCallable() { + return updateDataAgentSyncCallable; + } + + @Override + public UnaryCallable deleteDataAgentCallable() { + return deleteDataAgentCallable; + } + + @Override + public OperationCallable + deleteDataAgentOperationCallable() { + return deleteDataAgentOperationCallable; + } + + @Override + public UnaryCallable deleteDataAgentSyncCallable() { + return deleteDataAgentSyncCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceCallableFactory.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceCallableFactory.java new file mode 100644 index 000000000000..08f091b06976 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.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 DataChatService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataChatServiceCallableFactory 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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceStub.java new file mode 100644 index 000000000000..6b97bf7d08e6 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/GrpcDataChatServiceStub.java @@ -0,0 +1,441 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.ChatRequest; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsResponse; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.ListMessagesResponse; +import com.google.cloud.geminidataanalytics.v1.Message; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataChatService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataChatServiceStub extends DataChatServiceStub { + private static final MethodDescriptor chatMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataChatService/Chat") + .setRequestMarshaller(ProtoUtils.marshaller(ChatRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Message.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/CreateConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Conversation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/DeleteConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/GetConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Conversation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listConversationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/ListConversations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConversationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConversationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listMessagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataChatService/ListMessages") + .setRequestMarshaller(ProtoUtils.marshaller(ListMessagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMessagesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final ServerStreamingCallable chatCallable; + private final UnaryCallable createConversationCallable; + private final UnaryCallable deleteConversationCallable; + private final UnaryCallable getConversationCallable; + private final UnaryCallable + listConversationsCallable; + private final UnaryCallable + listConversationsPagedCallable; + private final UnaryCallable listMessagesCallable; + private final UnaryCallable + listMessagesPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataChatServiceStub create(DataChatServiceStubSettings settings) + throws IOException { + return new GrpcDataChatServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataChatServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataChatServiceStub( + DataChatServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataChatServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataChatServiceStub( + DataChatServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataChatServiceStub, 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 GrpcDataChatServiceStub( + DataChatServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataChatServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataChatServiceStub, 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 GrpcDataChatServiceStub( + DataChatServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings chatTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings getConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listConversationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listConversationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings listMessagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMessagesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.chatCallable = + callableFactory.createServerStreamingCallable( + chatTransportSettings, settings.chatSettings(), clientContext); + this.createConversationCallable = + callableFactory.createUnaryCallable( + createConversationTransportSettings, + settings.createConversationSettings(), + clientContext); + this.deleteConversationCallable = + callableFactory.createUnaryCallable( + deleteConversationTransportSettings, + settings.deleteConversationSettings(), + clientContext); + this.getConversationCallable = + callableFactory.createUnaryCallable( + getConversationTransportSettings, settings.getConversationSettings(), clientContext); + this.listConversationsCallable = + callableFactory.createUnaryCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listConversationsPagedCallable = + callableFactory.createPagedCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listMessagesCallable = + callableFactory.createUnaryCallable( + listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.listMessagesPagedCallable = + callableFactory.createPagedCallable( + listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public ServerStreamingCallable chatCallable() { + return chatCallable; + } + + @Override + public UnaryCallable createConversationCallable() { + return createConversationCallable; + } + + @Override + public UnaryCallable deleteConversationCallable() { + return deleteConversationCallable; + } + + @Override + public UnaryCallable getConversationCallable() { + return getConversationCallable; + } + + @Override + public UnaryCallable + listConversationsCallable() { + return listConversationsCallable; + } + + @Override + public UnaryCallable + listConversationsPagedCallable() { + return listConversationsPagedCallable; + } + + @Override + public UnaryCallable listMessagesCallable() { + return listMessagesCallable; + } + + @Override + public UnaryCallable listMessagesPagedCallable() { + return listMessagesPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceCallableFactory.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceCallableFactory.java new file mode 100644 index 000000000000..bc097c14aefc --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DataAgentService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataAgentServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceStub.java new file mode 100644 index 000000000000..1993f484d415 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataAgentServiceStub.java @@ -0,0 +1,1089 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataAgentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataAgentServiceStub extends DataAgentServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(DataAgent.getDescriptor()) + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listDataAgentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/ListDataAgents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAgents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDataAgentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsResponse> + listAccessibleDataAgentsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/ListAccessibleDataAgents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAgents:listAccessible", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "creatorFilter", request.getCreatorFilterValue()); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAccessibleDataAgentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataAgentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/GetDataAgent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataAgents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataAgent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDataAgentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/CreateDataAgent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAgents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "dataAgentId", request.getDataAgentId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAgent", request.getDataAgent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDataAgentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createDataAgentSyncMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/CreateDataAgentSync") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAgents:createSync", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "dataAgentId", request.getDataAgentId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAgent", request.getDataAgent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataAgent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDataAgentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/UpdateDataAgent") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataAgent.name=projects/*/locations/*/dataAgents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataAgent.name", request.getDataAgent().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAgent", request.getDataAgent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataAgentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDataAgentSyncMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/UpdateDataAgentSync") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataAgent.name=projects/*/locations/*/dataAgents/*}:updateSync", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataAgent.name", request.getDataAgent().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAgent", request.getDataAgent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataAgent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDataAgentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/DeleteDataAgent") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataAgents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDataAgentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDataAgentSyncMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/DeleteDataAgentSync") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataAgents/*}:deleteSync", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/GetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataAgentService/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listDataAgentsCallable; + private final UnaryCallable + listDataAgentsPagedCallable; + private final UnaryCallable + listAccessibleDataAgentsCallable; + private final UnaryCallable< + ListAccessibleDataAgentsRequest, ListAccessibleDataAgentsPagedResponse> + listAccessibleDataAgentsPagedCallable; + private final UnaryCallable getDataAgentCallable; + private final UnaryCallable createDataAgentCallable; + private final OperationCallable + createDataAgentOperationCallable; + private final UnaryCallable createDataAgentSyncCallable; + private final UnaryCallable updateDataAgentCallable; + private final OperationCallable + updateDataAgentOperationCallable; + private final UnaryCallable updateDataAgentSyncCallable; + private final UnaryCallable deleteDataAgentCallable; + private final OperationCallable + deleteDataAgentOperationCallable; + private final UnaryCallable deleteDataAgentSyncCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataAgentServiceStub create(DataAgentServiceStubSettings settings) + throws IOException { + return new HttpJsonDataAgentServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataAgentServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataAgentServiceStub( + DataAgentServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataAgentServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataAgentServiceStub( + DataAgentServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataAgentServiceStub, 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 HttpJsonDataAgentServiceStub( + DataAgentServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataAgentServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataAgentServiceStub, 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 HttpJsonDataAgentServiceStub( + DataAgentServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listDataAgentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataAgentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listAccessibleDataAgentsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAccessibleDataAgentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getDataAgentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataAgentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createDataAgentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataAgentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createDataAgentSyncTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataAgentSyncMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateDataAgentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataAgentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_agent.name", String.valueOf(request.getDataAgent().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDataAgentSyncTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataAgentSyncMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_agent.name", String.valueOf(request.getDataAgent().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDataAgentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAgentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings deleteDataAgentSyncTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAgentSyncMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listDataAgentsCallable = + callableFactory.createUnaryCallable( + listDataAgentsTransportSettings, settings.listDataAgentsSettings(), clientContext); + this.listDataAgentsPagedCallable = + callableFactory.createPagedCallable( + listDataAgentsTransportSettings, settings.listDataAgentsSettings(), clientContext); + this.listAccessibleDataAgentsCallable = + callableFactory.createUnaryCallable( + listAccessibleDataAgentsTransportSettings, + settings.listAccessibleDataAgentsSettings(), + clientContext); + this.listAccessibleDataAgentsPagedCallable = + callableFactory.createPagedCallable( + listAccessibleDataAgentsTransportSettings, + settings.listAccessibleDataAgentsSettings(), + clientContext); + this.getDataAgentCallable = + callableFactory.createUnaryCallable( + getDataAgentTransportSettings, settings.getDataAgentSettings(), clientContext); + this.createDataAgentCallable = + callableFactory.createUnaryCallable( + createDataAgentTransportSettings, settings.createDataAgentSettings(), clientContext); + this.createDataAgentOperationCallable = + callableFactory.createOperationCallable( + createDataAgentTransportSettings, + settings.createDataAgentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createDataAgentSyncCallable = + callableFactory.createUnaryCallable( + createDataAgentSyncTransportSettings, + settings.createDataAgentSyncSettings(), + clientContext); + this.updateDataAgentCallable = + callableFactory.createUnaryCallable( + updateDataAgentTransportSettings, settings.updateDataAgentSettings(), clientContext); + this.updateDataAgentOperationCallable = + callableFactory.createOperationCallable( + updateDataAgentTransportSettings, + settings.updateDataAgentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDataAgentSyncCallable = + callableFactory.createUnaryCallable( + updateDataAgentSyncTransportSettings, + settings.updateDataAgentSyncSettings(), + clientContext); + this.deleteDataAgentCallable = + callableFactory.createUnaryCallable( + deleteDataAgentTransportSettings, settings.deleteDataAgentSettings(), clientContext); + this.deleteDataAgentOperationCallable = + callableFactory.createOperationCallable( + deleteDataAgentTransportSettings, + settings.deleteDataAgentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDataAgentSyncCallable = + callableFactory.createUnaryCallable( + deleteDataAgentSyncTransportSettings, + settings.deleteDataAgentSyncSettings(), + clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listDataAgentsMethodDescriptor); + methodDescriptors.add(listAccessibleDataAgentsMethodDescriptor); + methodDescriptors.add(getDataAgentMethodDescriptor); + methodDescriptors.add(createDataAgentMethodDescriptor); + methodDescriptors.add(createDataAgentSyncMethodDescriptor); + methodDescriptors.add(updateDataAgentMethodDescriptor); + methodDescriptors.add(updateDataAgentSyncMethodDescriptor); + methodDescriptors.add(deleteDataAgentMethodDescriptor); + methodDescriptors.add(deleteDataAgentSyncMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listDataAgentsCallable() { + return listDataAgentsCallable; + } + + @Override + public UnaryCallable + listDataAgentsPagedCallable() { + return listDataAgentsPagedCallable; + } + + @Override + public UnaryCallable + listAccessibleDataAgentsCallable() { + return listAccessibleDataAgentsCallable; + } + + @Override + public UnaryCallable + listAccessibleDataAgentsPagedCallable() { + return listAccessibleDataAgentsPagedCallable; + } + + @Override + public UnaryCallable getDataAgentCallable() { + return getDataAgentCallable; + } + + @Override + public UnaryCallable createDataAgentCallable() { + return createDataAgentCallable; + } + + @Override + public OperationCallable + createDataAgentOperationCallable() { + return createDataAgentOperationCallable; + } + + @Override + public UnaryCallable createDataAgentSyncCallable() { + return createDataAgentSyncCallable; + } + + @Override + public UnaryCallable updateDataAgentCallable() { + return updateDataAgentCallable; + } + + @Override + public OperationCallable + updateDataAgentOperationCallable() { + return updateDataAgentOperationCallable; + } + + @Override + public UnaryCallable updateDataAgentSyncCallable() { + return updateDataAgentSyncCallable; + } + + @Override + public UnaryCallable deleteDataAgentCallable() { + return deleteDataAgentCallable; + } + + @Override + public OperationCallable + deleteDataAgentOperationCallable() { + return deleteDataAgentOperationCallable; + } + + @Override + public UnaryCallable deleteDataAgentSyncCallable() { + return deleteDataAgentSyncCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceCallableFactory.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceCallableFactory.java new file mode 100644 index 000000000000..f3cb11c76165 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DataChatService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataChatServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceStub.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceStub.java new file mode 100644 index 000000000000..02c4e42196e7 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/stub/HttpJsonDataChatServiceStub.java @@ -0,0 +1,666 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.geminidataanalytics.v1.ChatRequest; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsResponse; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.ListMessagesResponse; +import com.google.cloud.geminidataanalytics.v1.Message; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataChatService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataChatServiceStub extends DataChatServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor chatMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataChatService/Chat") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:chat", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Message.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/CreateConversation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/conversations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "conversationId", request.getConversationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("conversation", request.getConversation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Conversation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/DeleteConversation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/conversations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/GetConversation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/conversations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Conversation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listConversationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.geminidataanalytics.v1.DataChatService/ListConversations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/conversations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConversationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listMessagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.geminidataanalytics.v1.DataChatService/ListMessages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/conversations/*}/messages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMessagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final ServerStreamingCallable chatCallable; + private final UnaryCallable createConversationCallable; + private final UnaryCallable deleteConversationCallable; + private final UnaryCallable getConversationCallable; + private final UnaryCallable + listConversationsCallable; + private final UnaryCallable + listConversationsPagedCallable; + private final UnaryCallable listMessagesCallable; + private final UnaryCallable + listMessagesPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataChatServiceStub create(DataChatServiceStubSettings settings) + throws IOException { + return new HttpJsonDataChatServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataChatServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataChatServiceStub( + DataChatServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataChatServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataChatServiceStub( + DataChatServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataChatServiceStub, 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 HttpJsonDataChatServiceStub( + DataChatServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataChatServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataChatServiceStub, 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 HttpJsonDataChatServiceStub( + DataChatServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings chatTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(chatMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings getConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listConversationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listConversationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings listMessagesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listMessagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.chatCallable = + callableFactory.createServerStreamingCallable( + chatTransportSettings, settings.chatSettings(), clientContext); + this.createConversationCallable = + callableFactory.createUnaryCallable( + createConversationTransportSettings, + settings.createConversationSettings(), + clientContext); + this.deleteConversationCallable = + callableFactory.createUnaryCallable( + deleteConversationTransportSettings, + settings.deleteConversationSettings(), + clientContext); + this.getConversationCallable = + callableFactory.createUnaryCallable( + getConversationTransportSettings, settings.getConversationSettings(), clientContext); + this.listConversationsCallable = + callableFactory.createUnaryCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listConversationsPagedCallable = + callableFactory.createPagedCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listMessagesCallable = + callableFactory.createUnaryCallable( + listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.listMessagesPagedCallable = + callableFactory.createPagedCallable( + listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(chatMethodDescriptor); + methodDescriptors.add(createConversationMethodDescriptor); + methodDescriptors.add(deleteConversationMethodDescriptor); + methodDescriptors.add(getConversationMethodDescriptor); + methodDescriptors.add(listConversationsMethodDescriptor); + methodDescriptors.add(listMessagesMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public ServerStreamingCallable chatCallable() { + return chatCallable; + } + + @Override + public UnaryCallable createConversationCallable() { + return createConversationCallable; + } + + @Override + public UnaryCallable deleteConversationCallable() { + return deleteConversationCallable; + } + + @Override + public UnaryCallable getConversationCallable() { + return getConversationCallable; + } + + @Override + public UnaryCallable + listConversationsCallable() { + return listConversationsCallable; + } + + @Override + public UnaryCallable + listConversationsPagedCallable() { + return listConversationsPagedCallable; + } + + @Override + public UnaryCallable listMessagesCallable() { + return listMessagesCallable; + } + + @Override + public UnaryCallable listMessagesPagedCallable() { + return listMessagesPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/resources/META-INF/native-image/com.google.cloud.geminidataanalytics.v1/reflect-config.json b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/resources/META-INF/native-image/com.google.cloud.geminidataanalytics.v1/reflect-config.json new file mode 100644 index 000000000000..2dc2e7718008 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/resources/META-INF/native-image/com.google.cloud.geminidataanalytics.v1/reflect-config.json @@ -0,0 +1,3710 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisOptions$Python", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisOptions$Python$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.AnalysisQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryJob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryJob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryRoutine", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryRoutine$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryTableReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryTableReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Blob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Blob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChartResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChatRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChatRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChatRequest$Model", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ChatRequest$ThinkingMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Citation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Citation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationAnchor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationAnchor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationAnchor$TextMessageCitationAnchor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationAnchor$TextMessageCitationAnchor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CitationSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$SchemaRelationship", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$SchemaRelationship$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$SchemaRelationship$SchemaPaths", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$SchemaRelationship$SchemaPaths$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Context$SchemaRelationship$Source", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Conversation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Conversation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ConversationOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ConversationOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ConversationOptions$Model", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ConversationReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ConversationReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CreateConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CreateConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Credentials", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Credentials$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAgent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAgent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAgentContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAgentContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAgentContext$ContextVersion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataFilterType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DataResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Datasource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Datasource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DatasourceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DatasourceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DatasourceReferences", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DatasourceReferences$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ErrorMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ErrorMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ExampleQueries", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ExampleQueries$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ExampleQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ExampleQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Field", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Field$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GetConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GetConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GlossaryTerm", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.GlossaryTerm$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest$CreatorFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListConversationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListConversationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListConversationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListConversationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListMessagesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListMessagesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListMessagesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.ListMessagesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerExploreReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerExploreReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerExploreReferences", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerExploreReferences$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerQuery$Filter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerQuery$Filter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.LookerSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.MatchedQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.MatchedQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Message", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Message$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials$SecretBased", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials$SecretBased$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials$TokenBased", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OAuthCredentials$TokenBased$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.QueryParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.QueryParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.QueryParameterValues", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.QueryParameterValues$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Schema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.Schema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SchemaResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StorageMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StorageMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SystemMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.SystemMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.TextMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.TextMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.TextMessage$TextType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UserFunctions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UserFunctions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UserMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.geminidataanalytics.v1.UserMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FloatValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FloatValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientHttpJsonTest.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..a4f597a34db6 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientHttpJsonTest.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.geminidataanalytics.v1.stub.HttpJsonDataAgentServiceStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.Policy; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +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 DataAgentServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DataAgentServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataAgentServiceStub.getMethodDescriptors(), + DataAgentServiceSettings.getDefaultEndpoint()); + DataAgentServiceSettings settings = + DataAgentServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataAgentServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataAgentServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listDataAgentsTest() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListDataAgentsResponse expectedResponse = + ListDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataAgentsPagedResponse pagedListResponse = client.listDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataAgentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAgentsTest2() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListDataAgentsResponse expectedResponse = + ListDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDataAgentsPagedResponse pagedListResponse = client.listDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataAgentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccessibleDataAgentsTest() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListAccessibleDataAgentsResponse expectedResponse = + ListAccessibleDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAccessibleDataAgentsPagedResponse pagedListResponse = + client.listAccessibleDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAccessibleDataAgentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAccessibleDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccessibleDataAgentsTest2() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListAccessibleDataAgentsResponse expectedResponse = + ListAccessibleDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAccessibleDataAgentsPagedResponse pagedListResponse = + client.listAccessibleDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAccessibleDataAgentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listAccessibleDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockService.addResponse(expectedResponse); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + DataAgent actualResponse = client.getDataAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataAgentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.getDataAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAgentTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + + DataAgent actualResponse = client.getDataAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataAgentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + client.getDataAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataAgentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataAgentTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataAgentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataAgentSyncTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataAgentSyncExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAgentSyncTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataAgentSyncExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAgent dataAgent = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAgent actualResponse = client.updateDataAgentAsync(dataAgent, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataAgentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAgent dataAgent = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAgentAsync(dataAgent, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDataAgentSyncTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockService.addResponse(expectedResponse); + + DataAgent dataAgent = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAgent actualResponse = client.updateDataAgentSync(dataAgent, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataAgentSyncExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAgent dataAgent = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAgentSync(dataAgent, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataAgentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + client.deleteDataAgentAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataAgentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.deleteDataAgentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAgentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + + client.deleteDataAgentAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataAgentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + client.deleteDataAgentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAgentSyncTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + client.deleteDataAgentSync(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataAgentSyncExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.deleteDataAgentSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataAgentSyncTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + + client.deleteDataAgentSync(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataAgentSyncExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8616/locations/location-8616/dataAgents/dataAgent-8616"; + client.deleteDataAgentSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = "projects/project-3285/locations/location-3285/dataAgents/dataAgent-3285"; + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = "projects/project-3285/locations/location-3285/dataAgents/dataAgent-3285"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + Policy actualResponse = client.setIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.setIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = "projects/project-3285/locations/location-3285/dataAgents/dataAgent-3285"; + + Policy actualResponse = client.setIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = "projects/project-3285/locations/location-3285/dataAgents/dataAgent-3285"; + client.setIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientTest.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientTest.java new file mode 100644 index 000000000000..6685b19ad04b --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceClientTest.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListDataAgentsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient.ListLocationsPagedResponse; + +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.api.resourcenames.ResourceName; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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.HashMap; +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 DataAgentServiceClientTest { + private static MockDataAgentService mockDataAgentService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataAgentServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataAgentService = new MockDataAgentService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataAgentService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataAgentServiceSettings settings = + DataAgentServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataAgentServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listDataAgentsTest() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListDataAgentsResponse expectedResponse = + ListDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataAgentsPagedResponse pagedListResponse = client.listDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAgentsRequest actualRequest = ((ListDataAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAgentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAgentsTest2() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListDataAgentsResponse expectedResponse = + ListDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataAgentsPagedResponse pagedListResponse = client.listDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAgentsRequest actualRequest = ((ListDataAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAgentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccessibleDataAgentsTest() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListAccessibleDataAgentsResponse expectedResponse = + ListAccessibleDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAccessibleDataAgentsPagedResponse pagedListResponse = + client.listAccessibleDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccessibleDataAgentsRequest actualRequest = + ((ListAccessibleDataAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccessibleDataAgentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAccessibleDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccessibleDataAgentsTest2() throws Exception { + DataAgent responsesElement = DataAgent.newBuilder().build(); + ListAccessibleDataAgentsResponse expectedResponse = + ListAccessibleDataAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAgents(Arrays.asList(responsesElement)) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAccessibleDataAgentsPagedResponse pagedListResponse = + client.listAccessibleDataAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAgentsList().get(0), resources.get(0)); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccessibleDataAgentsRequest actualRequest = + ((ListAccessibleDataAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccessibleDataAgentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAccessibleDataAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockDataAgentService.addResponse(expectedResponse); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + DataAgent actualResponse = client.getDataAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAgentRequest actualRequest = ((GetDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.getDataAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAgentTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataAgent actualResponse = client.getDataAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAgentRequest actualRequest = ((GetDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAgentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String name = "name3373707"; + client.getDataAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataAgentService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAgentRequest actualRequest = ((CreateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(dataAgentId, actualRequest.getDataAgentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentAsync(parent, dataAgent, dataAgentId).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 createDataAgentTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataAgentService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAgentRequest actualRequest = ((CreateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(dataAgentId, actualRequest.getDataAgentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAgentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String parent = "parent-995424086"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentAsync(parent, dataAgent, dataAgentId).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 createDataAgentSyncTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockDataAgentService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAgentRequest actualRequest = ((CreateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(dataAgentId, actualRequest.getDataAgentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAgentSyncExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAgentSyncTest2() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + + DataAgent actualResponse = client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAgentRequest actualRequest = ((CreateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(dataAgentId, actualRequest.getDataAgentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAgentSyncExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String parent = "parent-995424086"; + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + client.createDataAgentSync(parent, dataAgent, dataAgentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataAgentTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataAgentService.addResponse(resultOperation); + + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAgent actualResponse = client.updateDataAgentAsync(dataAgent, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataAgentRequest actualRequest = ((UpdateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAgentAsync(dataAgent, updateMask).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 updateDataAgentSyncTest() throws Exception { + DataAgent expectedResponse = + DataAgent.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setKmsKey("kmsKey-1127483058") + .build(); + mockDataAgentService.addResponse(expectedResponse); + + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAgent actualResponse = client.updateDataAgentSync(dataAgent, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataAgentRequest actualRequest = ((UpdateDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(dataAgent, actualRequest.getDataAgent()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataAgentSyncExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAgentSync(dataAgent, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataAgentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataAgentService.addResponse(resultOperation); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + client.deleteDataAgentAsync(name).get(); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAgentRequest actualRequest = ((DeleteDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.deleteDataAgentAsync(name).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 deleteDataAgentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAgentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataAgentService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDataAgentAsync(name).get(); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAgentRequest actualRequest = ((DeleteDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAgentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataAgentAsync(name).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 deleteDataAgentSyncTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataAgentService.addResponse(expectedResponse); + + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + client.deleteDataAgentSync(name); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAgentRequest actualRequest = ((DeleteDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAgentSyncExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.deleteDataAgentSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataAgentSyncTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataAgentService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDataAgentSync(name); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAgentRequest actualRequest = ((DeleteDataAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAgentSyncExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataAgentSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String resource = "resource-341064690"; + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String resource = "resource-341064690"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + + Policy actualResponse = client.setIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + client.setIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockDataAgentService.addResponse(expectedResponse); + + String resource = "resource-341064690"; + + Policy actualResponse = client.setIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataAgentService.addException(exception); + + try { + String resource = "resource-341064690"; + client.setIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientHttpJsonTest.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..96e97ab1dbaf --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientHttpJsonTest.java @@ -0,0 +1,704 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.geminidataanalytics.v1.stub.HttpJsonDataChatServiceStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +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 DataChatServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DataChatServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataChatServiceStub.getMethodDescriptors(), + DataChatServiceSettings.getDefaultEndpoint()); + DataChatServiceSettings settings = + DataChatServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataChatServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataChatServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void chatTest() throws Exception {} + + @Test + public void chatExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + + @Test + public void createConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + + Conversation actualResponse = client.createConversation(parent, conversation, conversationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + client.createConversation(parent, conversation, conversationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + + Conversation actualResponse = client.createConversation(parent, conversation, conversationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + client.createConversation(parent, conversation, conversationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + client.deleteConversation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3338/locations/location-3338/conversations/conversation-3338"; + + client.deleteConversation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3338/locations/location-3338/conversations/conversation-3338"; + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockService.addResponse(expectedResponse); + + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3338/locations/location-3338/conversations/conversation-3338"; + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3338/locations/location-3338/conversations/conversation-3338"; + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listConversationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest2() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listConversationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagesTest() throws Exception { + StorageMessage responsesElement = StorageMessage.newBuilder().build(); + ListMessagesResponse expectedResponse = + ListMessagesResponse.newBuilder() + .setNextPageToken("") + .addAllMessages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + ListMessagesPagedResponse pagedListResponse = client.listMessages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMessagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.listMessages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagesTest2() throws Exception { + StorageMessage responsesElement = StorageMessage.newBuilder().build(); + ListMessagesResponse expectedResponse = + ListMessagesResponse.newBuilder() + .setNextPageToken("") + .addAllMessages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8053/locations/location-8053/conversations/conversation-8053"; + + ListMessagesPagedResponse pagedListResponse = client.listMessages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMessagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-8053/locations/location-8053/conversations/conversation-8053"; + client.listMessages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientTest.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientTest.java new file mode 100644 index 000000000000..1097b6bce8f8 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClientTest.java @@ -0,0 +1,682 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse; + +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.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +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 DataChatServiceClientTest { + private static MockDataChatService mockDataChatService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataChatServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataChatService = new MockDataChatService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataChatService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataChatServiceSettings settings = + DataChatServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataChatServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void chatTest() throws Exception { + Message expectedResponse = + Message.newBuilder() + .setTimestamp(Timestamp.newBuilder().build()) + .setMessageId("messageId-1440013438") + .build(); + mockDataChatService.addResponse(expectedResponse); + ChatRequest request = + ChatRequest.newBuilder() + .setParent("parent-995424086") + .addAllMessages(new ArrayList()) + .setCredentials(Credentials.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = client.chatCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void chatExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + ChatRequest request = + ChatRequest.newBuilder() + .setParent("parent-995424086") + .addAllMessages(new ArrayList()) + .setCredentials(Credentials.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = client.chatCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockDataChatService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + + Conversation actualResponse = client.createConversation(parent, conversation, conversationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversationRequest actualRequest = ((CreateConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertEquals(conversationId, actualRequest.getConversationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + client.createConversation(parent, conversation, conversationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockDataChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + + Conversation actualResponse = client.createConversation(parent, conversation, conversationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversationRequest actualRequest = ((CreateConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertEquals(conversationId, actualRequest.getConversationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + String parent = "parent-995424086"; + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + client.createConversation(parent, conversation, conversationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataChatService.addResponse(expectedResponse); + + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + client.deleteConversation(name); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversationRequest actualRequest = ((DeleteConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataChatService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteConversation(name); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversationRequest actualRequest = ((DeleteConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockDataChatService.addResponse(expectedResponse); + + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversationRequest actualRequest = ((GetConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .addAllAgents(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setLastUsedTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setKmsKey("kmsKey-1127483058") + .setMemoryPaused(true) + .build(); + mockDataChatService.addResponse(expectedResponse); + + String name = "name3373707"; + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversationRequest actualRequest = ((GetConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + String name = "name3373707"; + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockDataChatService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversationsRequest actualRequest = ((ListConversationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest2() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockDataChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversationsRequest actualRequest = ((ListConversationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagesTest() throws Exception { + StorageMessage responsesElement = StorageMessage.newBuilder().build(); + ListMessagesResponse expectedResponse = + ListMessagesResponse.newBuilder() + .setNextPageToken("") + .addAllMessages(Arrays.asList(responsesElement)) + .build(); + mockDataChatService.addResponse(expectedResponse); + + ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + + ListMessagesPagedResponse pagedListResponse = client.listMessages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagesList().get(0), resources.get(0)); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMessagesRequest actualRequest = ((ListMessagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMessagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + client.listMessages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMessagesTest2() throws Exception { + StorageMessage responsesElement = StorageMessage.newBuilder().build(); + ListMessagesResponse expectedResponse = + ListMessagesResponse.newBuilder() + .setNextPageToken("") + .addAllMessages(Arrays.asList(responsesElement)) + .build(); + mockDataChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMessagesPagedResponse pagedListResponse = client.listMessages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMessagesList().get(0), resources.get(0)); + + List actualRequests = mockDataChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMessagesRequest actualRequest = ((ListMessagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMessagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataChatService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMessages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentService.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentService.java new file mode 100644 index 000000000000..faa9240ed050 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 MockDataAgentService implements MockGrpcService { + private final MockDataAgentServiceImpl serviceImpl; + + public MockDataAgentService() { + serviceImpl = new MockDataAgentServiceImpl(); + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentServiceImpl.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentServiceImpl.java new file mode 100644 index 000000000000..72379abe4900 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataAgentServiceImpl.java @@ -0,0 +1,296 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceGrpc.DataAgentServiceImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +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 MockDataAgentServiceImpl extends DataAgentServiceImplBase { + private List requests; + private Queue responses; + + public MockDataAgentServiceImpl() { + 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 listDataAgents( + ListDataAgentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataAgentsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataAgentsResponse) 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 ListDataAgents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataAgentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAccessibleDataAgents( + ListAccessibleDataAgentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAccessibleDataAgentsResponse) { + requests.add(request); + responseObserver.onNext(((ListAccessibleDataAgentsResponse) 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 ListAccessibleDataAgents, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListAccessibleDataAgentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataAgent( + GetDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataAgent) { + requests.add(request); + responseObserver.onNext(((DataAgent) 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 GetDataAgent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataAgent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataAgent( + CreateDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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 CreateDataAgent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataAgentSync( + CreateDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataAgent) { + requests.add(request); + responseObserver.onNext(((DataAgent) 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 CreateDataAgentSync, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataAgent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataAgent( + UpdateDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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 UpdateDataAgent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataAgentSync( + UpdateDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataAgent) { + requests.add(request); + responseObserver.onNext(((DataAgent) 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 UpdateDataAgentSync, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataAgent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataAgent( + DeleteDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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 DeleteDataAgent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataAgentSync( + DeleteDataAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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 DeleteDataAgentSync, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatService.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatService.java new file mode 100644 index 000000000000..27f8161e2430 --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 MockDataChatService implements MockGrpcService { + private final MockDataChatServiceImpl serviceImpl; + + public MockDataChatService() { + serviceImpl = new MockDataChatServiceImpl(); + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatServiceImpl.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatServiceImpl.java new file mode 100644 index 000000000000..b0cf0e4c0c6b --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockDataChatServiceImpl.java @@ -0,0 +1,187 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceGrpc.DataChatServiceImplBase; +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 MockDataChatServiceImpl extends DataChatServiceImplBase { + private List requests; + private Queue responses; + + public MockDataChatServiceImpl() { + 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 chat(ChatRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Message) { + requests.add(request); + responseObserver.onNext(((Message) 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 Chat, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Message.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConversation( + CreateConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Conversation) { + requests.add(request); + responseObserver.onNext(((Conversation) 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 CreateConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Conversation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConversation( + DeleteConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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 DeleteConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConversation( + GetConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Conversation) { + requests.add(request); + responseObserver.onNext(((Conversation) 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 GetConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Conversation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listConversations( + ListConversationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConversationsResponse) { + requests.add(request); + responseObserver.onNext(((ListConversationsResponse) 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 ListConversations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConversationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMessages( + ListMessagesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMessagesResponse) { + requests.add(request); + responseObserver.onNext(((ListMessagesResponse) 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 ListMessages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMessagesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocations.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocations.java new file mode 100644 index 000000000000..c135eef41bae --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @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/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocationsImpl.java b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..4f0b6c40a91a --- /dev/null +++ b/java-geminidataanalytics/google-cloud-geminidataanalytics/src/test/java/com/google/cloud/geminidataanalytics/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +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 MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + 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 listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/pom.xml b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/pom.xml new file mode 100644 index 000000000000..2b3c684b42ac --- /dev/null +++ b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + grpc-google-cloud-geminidataanalytics-v1 + GRPC library for google-cloud-geminidataanalytics + + com.google.cloud + google-cloud-geminidataanalytics-parent + 0.21.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-geminidataanalytics-v1 + + + com.google.guava + guava + + + diff --git a/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceGrpc.java b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceGrpc.java new file mode 100644 index 000000000000..353529e23c58 --- /dev/null +++ b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceGrpc.java @@ -0,0 +1,1744 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class DataAgentServiceGrpc { + + private DataAgentServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.geminidataanalytics.v1.DataAgentService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse> + getListDataAgentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataAgents", + requestType = com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse> + getListDataAgentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse> + getListDataAgentsMethod; + if ((getListDataAgentsMethod = DataAgentServiceGrpc.getListDataAgentsMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getListDataAgentsMethod = DataAgentServiceGrpc.getListDataAgentsMethod) == null) { + DataAgentServiceGrpc.getListDataAgentsMethod = + getListDataAgentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataAgents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("ListDataAgents")) + .build(); + } + } + } + return getListDataAgentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + getListAccessibleDataAgentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAccessibleDataAgents", + requestType = com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + getListAccessibleDataAgentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + getListAccessibleDataAgentsMethod; + if ((getListAccessibleDataAgentsMethod = DataAgentServiceGrpc.getListAccessibleDataAgentsMethod) + == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getListAccessibleDataAgentsMethod = + DataAgentServiceGrpc.getListAccessibleDataAgentsMethod) + == null) { + DataAgentServiceGrpc.getListAccessibleDataAgentsMethod = + getListAccessibleDataAgentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAccessibleDataAgents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1 + .ListAccessibleDataAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1 + .ListAccessibleDataAgentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("ListAccessibleDataAgents")) + .build(); + } + } + } + return getListAccessibleDataAgentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getGetDataAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataAgent", + requestType = com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.DataAgent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getGetDataAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getGetDataAgentMethod; + if ((getGetDataAgentMethod = DataAgentServiceGrpc.getGetDataAgentMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getGetDataAgentMethod = DataAgentServiceGrpc.getGetDataAgentMethod) == null) { + DataAgentServiceGrpc.getGetDataAgentMethod = + getGetDataAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DataAgent + .getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("GetDataAgent")) + .build(); + } + } + } + return getGetDataAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.longrunning.Operation> + getCreateDataAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataAgent", + requestType = com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.longrunning.Operation> + getCreateDataAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.longrunning.Operation> + getCreateDataAgentMethod; + if ((getCreateDataAgentMethod = DataAgentServiceGrpc.getCreateDataAgentMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getCreateDataAgentMethod = DataAgentServiceGrpc.getCreateDataAgentMethod) == null) { + DataAgentServiceGrpc.getCreateDataAgentMethod = + getCreateDataAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("CreateDataAgent")) + .build(); + } + } + } + return getCreateDataAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getCreateDataAgentSyncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataAgentSync", + requestType = com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.DataAgent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getCreateDataAgentSyncMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getCreateDataAgentSyncMethod; + if ((getCreateDataAgentSyncMethod = DataAgentServiceGrpc.getCreateDataAgentSyncMethod) + == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getCreateDataAgentSyncMethod = DataAgentServiceGrpc.getCreateDataAgentSyncMethod) + == null) { + DataAgentServiceGrpc.getCreateDataAgentSyncMethod = + getCreateDataAgentSyncMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDataAgentSync")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DataAgent + .getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("CreateDataAgentSync")) + .build(); + } + } + } + return getCreateDataAgentSyncMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.longrunning.Operation> + getUpdateDataAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataAgent", + requestType = com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.longrunning.Operation> + getUpdateDataAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.longrunning.Operation> + getUpdateDataAgentMethod; + if ((getUpdateDataAgentMethod = DataAgentServiceGrpc.getUpdateDataAgentMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getUpdateDataAgentMethod = DataAgentServiceGrpc.getUpdateDataAgentMethod) == null) { + DataAgentServiceGrpc.getUpdateDataAgentMethod = + getUpdateDataAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("UpdateDataAgent")) + .build(); + } + } + } + return getUpdateDataAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getUpdateDataAgentSyncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataAgentSync", + requestType = com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.DataAgent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getUpdateDataAgentSyncMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent> + getUpdateDataAgentSyncMethod; + if ((getUpdateDataAgentSyncMethod = DataAgentServiceGrpc.getUpdateDataAgentSyncMethod) + == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getUpdateDataAgentSyncMethod = DataAgentServiceGrpc.getUpdateDataAgentSyncMethod) + == null) { + DataAgentServiceGrpc.getUpdateDataAgentSyncMethod = + getUpdateDataAgentSyncMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDataAgentSync")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DataAgent + .getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("UpdateDataAgentSync")) + .build(); + } + } + } + return getUpdateDataAgentSyncMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.longrunning.Operation> + getDeleteDataAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataAgent", + requestType = com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.longrunning.Operation> + getDeleteDataAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.longrunning.Operation> + getDeleteDataAgentMethod; + if ((getDeleteDataAgentMethod = DataAgentServiceGrpc.getDeleteDataAgentMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getDeleteDataAgentMethod = DataAgentServiceGrpc.getDeleteDataAgentMethod) == null) { + DataAgentServiceGrpc.getDeleteDataAgentMethod = + getDeleteDataAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("DeleteDataAgent")) + .build(); + } + } + } + return getDeleteDataAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, com.google.protobuf.Empty> + getDeleteDataAgentSyncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataAgentSync", + requestType = com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, com.google.protobuf.Empty> + getDeleteDataAgentSyncMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.protobuf.Empty> + getDeleteDataAgentSyncMethod; + if ((getDeleteDataAgentSyncMethod = DataAgentServiceGrpc.getDeleteDataAgentSyncMethod) + == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getDeleteDataAgentSyncMethod = DataAgentServiceGrpc.getDeleteDataAgentSyncMethod) + == null) { + DataAgentServiceGrpc.getDeleteDataAgentSyncMethod = + getDeleteDataAgentSyncMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDataAgentSync")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("DeleteDataAgentSync")) + .build(); + } + } + } + return getDeleteDataAgentSyncMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = DataAgentServiceGrpc.getGetIamPolicyMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getGetIamPolicyMethod = DataAgentServiceGrpc.getGetIamPolicyMethod) == null) { + DataAgentServiceGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = DataAgentServiceGrpc.getSetIamPolicyMethod) == null) { + synchronized (DataAgentServiceGrpc.class) { + if ((getSetIamPolicyMethod = DataAgentServiceGrpc.getSetIamPolicyMethod) == null) { + DataAgentServiceGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new DataAgentServiceMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataAgentServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataAgentServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceStub(channel, callOptions); + } + }; + return DataAgentServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static DataAgentServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataAgentServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceBlockingV2Stub(channel, callOptions); + } + }; + return DataAgentServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataAgentServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataAgentServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceBlockingStub(channel, callOptions); + } + }; + return DataAgentServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataAgentServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataAgentServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceFutureStub(channel, callOptions); + } + }; + return DataAgentServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists DataAgents in a given project and location.
+     * 
+ */ + default void listDataAgents( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataAgentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataAgents that are accessible to the caller in a given project and
+     * location.
+     * 
+ */ + default void listAccessibleDataAgents( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAccessibleDataAgentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DataAgent.
+     * 
+ */ + default void getDataAgent( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location.
+     * 
+ */ + default void createDataAgent( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location synchronously.
+     * 
+ */ + default void createDataAgentSync( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataAgentSyncMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent.
+     * 
+ */ + default void updateDataAgent( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent synchronously.
+     * 
+ */ + default void updateDataAgentSync( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataAgentSyncMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single DataAgent.
+     * 
+ */ + default void deleteDataAgent( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single DataAgent synchronously.
+     * 
+ */ + default void deleteDataAgentSync( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataAgentSyncMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the IAM policy for DataAgent
+     * 
+ */ + default void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Sets the IAM policy for a DataAgent.
+     * 
+ */ + default void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataAgentService. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public abstract static class DataAgentServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DataAgentServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataAgentService. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class DataAgentServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataAgentServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataAgentServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DataAgents in a given project and location.
+     * 
+ */ + public void listDataAgents( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataAgentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataAgents that are accessible to the caller in a given project and
+     * location.
+     * 
+ */ + public void listAccessibleDataAgents( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAccessibleDataAgentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DataAgent.
+     * 
+ */ + public void getDataAgent( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location.
+     * 
+ */ + public void createDataAgent( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location synchronously.
+     * 
+ */ + public void createDataAgentSync( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataAgentSyncMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent.
+     * 
+ */ + public void updateDataAgent( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent synchronously.
+     * 
+ */ + public void updateDataAgentSync( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataAgentSyncMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single DataAgent.
+     * 
+ */ + public void deleteDataAgent( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single DataAgent synchronously.
+     * 
+ */ + public void deleteDataAgentSync( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataAgentSyncMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the IAM policy for DataAgent
+     * 
+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Sets the IAM policy for a DataAgent.
+     * 
+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataAgentService. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class DataAgentServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private DataAgentServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataAgentServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DataAgents in a given project and location.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse listDataAgents( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDataAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataAgents that are accessible to the caller in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + listAccessibleDataAgents( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAccessibleDataAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DataAgent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDataAgent( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location synchronously.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent createDataAgentSync( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent.
+     * 
+ */ + public com.google.longrunning.Operation updateDataAgent( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent synchronously.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent updateDataAgentSync( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataAgent( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent synchronously.
+     * 
+ */ + public com.google.protobuf.Empty deleteDataAgentSync( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the IAM policy for DataAgent
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Sets the IAM policy for a DataAgent.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service DataAgentService. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class DataAgentServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataAgentServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataAgentServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DataAgents in a given project and location.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse listDataAgents( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataAgents that are accessible to the caller in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + listAccessibleDataAgents( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAccessibleDataAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DataAgent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDataAgent( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location synchronously.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent createDataAgentSync( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent.
+     * 
+ */ + public com.google.longrunning.Operation updateDataAgent( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent synchronously.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.DataAgent updateDataAgentSync( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataAgent( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent synchronously.
+     * 
+ */ + public com.google.protobuf.Empty deleteDataAgentSync( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataAgentSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the IAM policy for DataAgent
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Sets the IAM policy for a DataAgent.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataAgentService. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class DataAgentServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataAgentServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataAgentServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataAgentServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DataAgents in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse> + listDataAgents(com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataAgentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataAgents that are accessible to the caller in a given project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse> + listAccessibleDataAgents( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAccessibleDataAgentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single DataAgent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.DataAgent> + getDataAgent(com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataAgent(com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new DataAgent in a given project and location synchronously.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.DataAgent> + createDataAgentSync( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataAgentSyncMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataAgent(com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DataAgent synchronously.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.DataAgent> + updateDataAgentSync( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataAgentSyncMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataAgent(com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single DataAgent synchronously.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataAgentSync( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataAgentSyncMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the IAM policy for DataAgent
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Sets the IAM policy for a DataAgent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_DATA_AGENTS = 0; + private static final int METHODID_LIST_ACCESSIBLE_DATA_AGENTS = 1; + private static final int METHODID_GET_DATA_AGENT = 2; + private static final int METHODID_CREATE_DATA_AGENT = 3; + private static final int METHODID_CREATE_DATA_AGENT_SYNC = 4; + private static final int METHODID_UPDATE_DATA_AGENT = 5; + private static final int METHODID_UPDATE_DATA_AGENT_SYNC = 6; + private static final int METHODID_DELETE_DATA_AGENT = 7; + private static final int METHODID_DELETE_DATA_AGENT_SYNC = 8; + private static final int METHODID_GET_IAM_POLICY = 9; + private static final int METHODID_SET_IAM_POLICY = 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_DATA_AGENTS: + serviceImpl.listDataAgents( + (com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse>) + responseObserver); + break; + case METHODID_LIST_ACCESSIBLE_DATA_AGENTS: + serviceImpl.listAccessibleDataAgents( + (com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse>) + responseObserver); + break; + case METHODID_GET_DATA_AGENT: + serviceImpl.getDataAgent( + (com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DATA_AGENT: + serviceImpl.createDataAgent( + (com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DATA_AGENT_SYNC: + serviceImpl.createDataAgentSync( + (com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATA_AGENT: + serviceImpl.updateDataAgent( + (com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_AGENT_SYNC: + serviceImpl.updateDataAgentSync( + (com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_DATA_AGENT: + serviceImpl.deleteDataAgent( + (com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DATA_AGENT_SYNC: + serviceImpl.deleteDataAgentSync( + (com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListDataAgentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse>( + service, METHODID_LIST_DATA_AGENTS))) + .addMethod( + getListAccessibleDataAgentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse>( + service, METHODID_LIST_ACCESSIBLE_DATA_AGENTS))) + .addMethod( + getGetDataAgentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent>( + service, METHODID_GET_DATA_AGENT))) + .addMethod( + getCreateDataAgentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DATA_AGENT))) + .addMethod( + getCreateDataAgentSyncMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent>( + service, METHODID_CREATE_DATA_AGENT_SYNC))) + .addMethod( + getUpdateDataAgentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DATA_AGENT))) + .addMethod( + getUpdateDataAgentSyncMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest, + com.google.cloud.geminidataanalytics.v1.DataAgent>( + service, METHODID_UPDATE_DATA_AGENT_SYNC))) + .addMethod( + getDeleteDataAgentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DATA_AGENT))) + .addMethod( + getDeleteDataAgentSyncMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_DATA_AGENT_SYNC))) + .addMethod( + getGetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_GET_IAM_POLICY))) + .addMethod( + getSetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_SET_IAM_POLICY))) + .build(); + } + + private abstract static class DataAgentServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataAgentServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataAgentService"); + } + } + + private static final class DataAgentServiceFileDescriptorSupplier + extends DataAgentServiceBaseDescriptorSupplier { + DataAgentServiceFileDescriptorSupplier() {} + } + + private static final class DataAgentServiceMethodDescriptorSupplier + extends DataAgentServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DataAgentServiceMethodDescriptorSupplier(java.lang.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 (DataAgentServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataAgentServiceFileDescriptorSupplier()) + .addMethod(getListDataAgentsMethod()) + .addMethod(getListAccessibleDataAgentsMethod()) + .addMethod(getGetDataAgentMethod()) + .addMethod(getCreateDataAgentMethod()) + .addMethod(getCreateDataAgentSyncMethod()) + .addMethod(getUpdateDataAgentMethod()) + .addMethod(getUpdateDataAgentSyncMethod()) + .addMethod(getDeleteDataAgentMethod()) + .addMethod(getDeleteDataAgentSyncMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getSetIamPolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceGrpc.java b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceGrpc.java new file mode 100644 index 000000000000..230b1dcd5236 --- /dev/null +++ b/java-geminidataanalytics/grpc-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceGrpc.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service to ask a natural language question on top of BigQuery
+ * and Looker Studio datasources to get back streamed responses of various kinds
+ * to help provide a rich conversational answer.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class DataChatServiceGrpc { + + private DataChatServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.geminidataanalytics.v1.DataChatService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ChatRequest, + com.google.cloud.geminidataanalytics.v1.Message> + getChatMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Chat", + requestType = com.google.cloud.geminidataanalytics.v1.ChatRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.Message.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ChatRequest, + com.google.cloud.geminidataanalytics.v1.Message> + getChatMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ChatRequest, + com.google.cloud.geminidataanalytics.v1.Message> + getChatMethod; + if ((getChatMethod = DataChatServiceGrpc.getChatMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getChatMethod = DataChatServiceGrpc.getChatMethod) == null) { + DataChatServiceGrpc.getChatMethod = + getChatMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Chat")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ChatRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance())) + .setSchemaDescriptor(new DataChatServiceMethodDescriptorSupplier("Chat")) + .build(); + } + } + } + return getChatMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getCreateConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConversation", + requestType = com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.Conversation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getCreateConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getCreateConversationMethod; + if ((getCreateConversationMethod = DataChatServiceGrpc.getCreateConversationMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getCreateConversationMethod = DataChatServiceGrpc.getCreateConversationMethod) + == null) { + DataChatServiceGrpc.getCreateConversationMethod = + getCreateConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.Conversation + .getDefaultInstance())) + .setSchemaDescriptor( + new DataChatServiceMethodDescriptorSupplier("CreateConversation")) + .build(); + } + } + } + return getCreateConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConversation", + requestType = com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod; + if ((getDeleteConversationMethod = DataChatServiceGrpc.getDeleteConversationMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getDeleteConversationMethod = DataChatServiceGrpc.getDeleteConversationMethod) + == null) { + DataChatServiceGrpc.getDeleteConversationMethod = + getDeleteConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataChatServiceMethodDescriptorSupplier("DeleteConversation")) + .build(); + } + } + } + return getDeleteConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getGetConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConversation", + requestType = com.google.cloud.geminidataanalytics.v1.GetConversationRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.Conversation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getGetConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.GetConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation> + getGetConversationMethod; + if ((getGetConversationMethod = DataChatServiceGrpc.getGetConversationMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getGetConversationMethod = DataChatServiceGrpc.getGetConversationMethod) == null) { + DataChatServiceGrpc.getGetConversationMethod = + getGetConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.Conversation + .getDefaultInstance())) + .setSchemaDescriptor( + new DataChatServiceMethodDescriptorSupplier("GetConversation")) + .build(); + } + } + } + return getGetConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + getListConversationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConversations", + requestType = com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + getListConversationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + getListConversationsMethod; + if ((getListConversationsMethod = DataChatServiceGrpc.getListConversationsMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getListConversationsMethod = DataChatServiceGrpc.getListConversationsMethod) == null) { + DataChatServiceGrpc.getListConversationsMethod = + getListConversationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConversations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataChatServiceMethodDescriptorSupplier("ListConversations")) + .build(); + } + } + } + return getListConversationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse> + getListMessagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMessages", + requestType = com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.class, + responseType = com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse> + getListMessagesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse> + getListMessagesMethod; + if ((getListMessagesMethod = DataChatServiceGrpc.getListMessagesMethod) == null) { + synchronized (DataChatServiceGrpc.class) { + if ((getListMessagesMethod = DataChatServiceGrpc.getListMessagesMethod) == null) { + DataChatServiceGrpc.getListMessagesMethod = + getListMessagesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMessages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataChatServiceMethodDescriptorSupplier("ListMessages")) + .build(); + } + } + } + return getListMessagesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataChatServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataChatServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceStub(channel, callOptions); + } + }; + return DataChatServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static DataChatServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataChatServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceBlockingV2Stub(channel, callOptions); + } + }; + return DataChatServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataChatServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataChatServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceBlockingStub(channel, callOptions); + } + }; + return DataChatServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataChatServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataChatServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceFutureStub(channel, callOptions); + } + }; + return DataChatServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Answers a data question by generating a stream of
+     * [Message][google.cloud.geminidataanalytics.v1.Message] objects.
+     * 
+ */ + default void chat( + com.google.cloud.geminidataanalytics.v1.ChatRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getChatMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new conversation to persist the conversation history. Each
+     * conversation will have multiple messages associated with it.
+     * 
+ */ + default void createConversation( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a conversation.
+     * 
+ */ + default void deleteConversation( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single conversation by using conversation id and parent.
+     * 
+ */ + default void getConversation( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all conversations for a given parent.
+     * 
+ */ + default void listConversations( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConversationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all messages for a given conversation.
+     * 
+ */ + default void listMessages( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMessagesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataChatService. + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public abstract static class DataChatServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DataChatServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataChatService. + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public static final class DataChatServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataChatServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataChatServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Answers a data question by generating a stream of
+     * [Message][google.cloud.geminidataanalytics.v1.Message] objects.
+     * 
+ */ + public void chat( + com.google.cloud.geminidataanalytics.v1.ChatRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getChatMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new conversation to persist the conversation history. Each
+     * conversation will have multiple messages associated with it.
+     * 
+ */ + public void createConversation( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a conversation.
+     * 
+ */ + public void deleteConversation( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single conversation by using conversation id and parent.
+     * 
+ */ + public void getConversation( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all conversations for a given parent.
+     * 
+ */ + public void listConversations( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConversationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all messages for a given conversation.
+     * 
+ */ + public void listMessages( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMessagesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataChatService. + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public static final class DataChatServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private DataChatServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataChatServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Answers a data question by generating a stream of
+     * [Message][google.cloud.geminidataanalytics.v1.Message] objects.
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall chat( + com.google.cloud.geminidataanalytics.v1.ChatRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getChatMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new conversation to persist the conversation history. Each
+     * conversation will have multiple messages associated with it.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.Conversation createConversation( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a conversation.
+     * 
+ */ + public com.google.protobuf.Empty deleteConversation( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single conversation by using conversation id and parent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.Conversation getConversation( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all conversations for a given parent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListConversationsResponse listConversations( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListConversationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all messages for a given conversation.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListMessagesResponse listMessages( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListMessagesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service DataChatService. + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public static final class DataChatServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataChatServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataChatServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Answers a data question by generating a stream of
+     * [Message][google.cloud.geminidataanalytics.v1.Message] objects.
+     * 
+ */ + public java.util.Iterator chat( + com.google.cloud.geminidataanalytics.v1.ChatRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getChatMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new conversation to persist the conversation history. Each
+     * conversation will have multiple messages associated with it.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.Conversation createConversation( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a conversation.
+     * 
+ */ + public com.google.protobuf.Empty deleteConversation( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single conversation by using conversation id and parent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.Conversation getConversation( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all conversations for a given parent.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListConversationsResponse listConversations( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConversationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all messages for a given conversation.
+     * 
+ */ + public com.google.cloud.geminidataanalytics.v1.ListMessagesResponse listMessages( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMessagesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataChatService. + * + *
+   * Service to ask a natural language question on top of BigQuery
+   * and Looker Studio datasources to get back streamed responses of various kinds
+   * to help provide a rich conversational answer.
+   * 
+ */ + public static final class DataChatServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataChatServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataChatServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataChatServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new conversation to persist the conversation history. Each
+     * conversation will have multiple messages associated with it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.Conversation> + createConversation( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a conversation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConversation( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single conversation by using conversation id and parent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.Conversation> + getConversation(com.google.cloud.geminidataanalytics.v1.GetConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all conversations for a given parent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse> + listConversations( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConversationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all messages for a given conversation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse> + listMessages(com.google.cloud.geminidataanalytics.v1.ListMessagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMessagesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CHAT = 0; + private static final int METHODID_CREATE_CONVERSATION = 1; + private static final int METHODID_DELETE_CONVERSATION = 2; + private static final int METHODID_GET_CONVERSATION = 3; + private static final int METHODID_LIST_CONVERSATIONS = 4; + private static final int METHODID_LIST_MESSAGES = 5; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_CHAT: + serviceImpl.chat( + (com.google.cloud.geminidataanalytics.v1.ChatRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CONVERSATION: + serviceImpl.createConversation( + (com.google.cloud.geminidataanalytics.v1.CreateConversationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_CONVERSATION: + serviceImpl.deleteConversation( + (com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONVERSATION: + serviceImpl.getConversation( + (com.google.cloud.geminidataanalytics.v1.GetConversationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CONVERSATIONS: + serviceImpl.listConversations( + (com.google.cloud.geminidataanalytics.v1.ListConversationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse>) + responseObserver); + break; + case METHODID_LIST_MESSAGES: + serviceImpl.listMessages( + (com.google.cloud.geminidataanalytics.v1.ListMessagesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse>) + 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(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getChatMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.ChatRequest, + com.google.cloud.geminidataanalytics.v1.Message>(service, METHODID_CHAT))) + .addMethod( + getCreateConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation>( + service, METHODID_CREATE_CONVERSATION))) + .addMethod( + getDeleteConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_CONVERSATION))) + .addMethod( + getGetConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.GetConversationRequest, + com.google.cloud.geminidataanalytics.v1.Conversation>( + service, METHODID_GET_CONVERSATION))) + .addMethod( + getListConversationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse>( + service, METHODID_LIST_CONVERSATIONS))) + .addMethod( + getListMessagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse>( + service, METHODID_LIST_MESSAGES))) + .build(); + } + + private abstract static class DataChatServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataChatServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataChatService"); + } + } + + private static final class DataChatServiceFileDescriptorSupplier + extends DataChatServiceBaseDescriptorSupplier { + DataChatServiceFileDescriptorSupplier() {} + } + + private static final class DataChatServiceMethodDescriptorSupplier + extends DataChatServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DataChatServiceMethodDescriptorSupplier(java.lang.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 (DataChatServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataChatServiceFileDescriptorSupplier()) + .addMethod(getChatMethod()) + .addMethod(getCreateConversationMethod()) + .addMethod(getDeleteConversationMethod()) + .addMethod(getGetConversationMethod()) + .addMethod(getListConversationsMethod()) + .addMethod(getListMessagesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-geminidataanalytics/pom.xml b/java-geminidataanalytics/pom.xml index 815924bc7054..1a3cd8aa74d9 100644 --- a/java-geminidataanalytics/pom.xml +++ b/java-geminidataanalytics/pom.xml @@ -31,6 +31,16 @@ google-cloud-geminidataanalytics 0.21.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + com.google.api.grpc grpc-google-cloud-geminidataanalytics-v1beta @@ -48,7 +58,9 @@ google-cloud-geminidataanalytics grpc-google-cloud-geminidataanalytics-v1beta + grpc-google-cloud-geminidataanalytics-v1 proto-google-cloud-geminidataanalytics-v1beta + proto-google-cloud-geminidataanalytics-v1 google-cloud-geminidataanalytics-bom diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/clirr-ignored-differences.xml b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..a64748f7676f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/geminidataanalytics/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/geminidataanalytics/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/geminidataanalytics/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * clear() + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * clone() + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/geminidataanalytics/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/pom.xml b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/pom.xml new file mode 100644 index 000000000000..0e21d889960b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-geminidataanalytics-v1 + 0.21.0-SNAPSHOT + proto-google-cloud-geminidataanalytics-v1 + Proto library for google-cloud-geminidataanalytics + + com.google.cloud + google-cloud-geminidataanalytics-parent + 0.21.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEvent.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEvent.java new file mode 100644 index 000000000000..4b9a7410922f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEvent.java @@ -0,0 +1,2908 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * An event indicating the progress of an analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisEvent} + */ +@com.google.protobuf.Generated +public final class AnalysisEvent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.AnalysisEvent) + AnalysisEventOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnalysisEvent"); + } + + // Use AnalysisEvent.newBuilder() to construct. + private AnalysisEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnalysisEvent() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.class, + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLANNER_REASONING(2), + CODER_INSTRUCTION(3), + CODE(4), + EXECUTION_OUTPUT(5), + EXECUTION_ERROR(6), + RESULT_VEGA_CHART_JSON(7), + RESULT_NATURAL_LANGUAGE(8), + RESULT_CSV_DATA(9), + RESULT_REFERENCE_DATA(10), + ERROR(11), + 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 2: + return PLANNER_REASONING; + case 3: + return CODER_INSTRUCTION; + case 4: + return CODE; + case 5: + return EXECUTION_OUTPUT; + case 6: + return EXECUTION_ERROR; + case 7: + return RESULT_VEGA_CHART_JSON; + case 8: + return RESULT_NATURAL_LANGUAGE; + case 9: + return RESULT_CSV_DATA; + case 10: + return RESULT_REFERENCE_DATA; + case 11: + return ERROR; + 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 PLANNER_REASONING_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return Whether the plannerReasoning field is set. + */ + public boolean hasPlannerReasoning() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return The plannerReasoning. + */ + public java.lang.String getPlannerReasoning() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + 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 (kindCase_ == 2) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return The bytes for plannerReasoning. + */ + public com.google.protobuf.ByteString getPlannerReasoningBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODER_INSTRUCTION_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return Whether the coderInstruction field is set. + */ + public boolean hasCoderInstruction() { + return kindCase_ == 3; + } + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return The coderInstruction. + */ + public java.lang.String getCoderInstruction() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + 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 (kindCase_ == 3) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return The bytes for coderInstruction. + */ + public com.google.protobuf.ByteString getCoderInstructionBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return Whether the code field is set. + */ + public boolean hasCode() { + return kindCase_ == 4; + } + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = ""; + if (kindCase_ == 4) { + ref = kind_; + } + 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 (kindCase_ == 4) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 4) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 4) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_OUTPUT_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return Whether the executionOutput field is set. + */ + public boolean hasExecutionOutput() { + return kindCase_ == 5; + } + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return The executionOutput. + */ + public java.lang.String getExecutionOutput() { + java.lang.Object ref = ""; + if (kindCase_ == 5) { + ref = kind_; + } + 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 (kindCase_ == 5) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return The bytes for executionOutput. + */ + public com.google.protobuf.ByteString getExecutionOutputBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 5) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 5) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ERROR_FIELD_NUMBER = 6; + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return Whether the executionError field is set. + */ + public boolean hasExecutionError() { + return kindCase_ == 6; + } + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return The executionError. + */ + public java.lang.String getExecutionError() { + java.lang.Object ref = ""; + if (kindCase_ == 6) { + ref = kind_; + } + 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 (kindCase_ == 6) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return The bytes for executionError. + */ + public com.google.protobuf.ByteString getExecutionErrorBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 6) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 6) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_VEGA_CHART_JSON_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return Whether the resultVegaChartJson field is set. + */ + public boolean hasResultVegaChartJson() { + return kindCase_ == 7; + } + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return The resultVegaChartJson. + */ + public java.lang.String getResultVegaChartJson() { + java.lang.Object ref = ""; + if (kindCase_ == 7) { + ref = kind_; + } + 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 (kindCase_ == 7) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return The bytes for resultVegaChartJson. + */ + public com.google.protobuf.ByteString getResultVegaChartJsonBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 7) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 7) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_NATURAL_LANGUAGE_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return Whether the resultNaturalLanguage field is set. + */ + public boolean hasResultNaturalLanguage() { + return kindCase_ == 8; + } + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return The resultNaturalLanguage. + */ + public java.lang.String getResultNaturalLanguage() { + java.lang.Object ref = ""; + if (kindCase_ == 8) { + ref = kind_; + } + 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 (kindCase_ == 8) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return The bytes for resultNaturalLanguage. + */ + public com.google.protobuf.ByteString getResultNaturalLanguageBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 8) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 8) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_CSV_DATA_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return Whether the resultCsvData field is set. + */ + public boolean hasResultCsvData() { + return kindCase_ == 9; + } + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return The resultCsvData. + */ + public java.lang.String getResultCsvData() { + java.lang.Object ref = ""; + if (kindCase_ == 9) { + ref = kind_; + } + 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 (kindCase_ == 9) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return The bytes for resultCsvData. + */ + public com.google.protobuf.ByteString getResultCsvDataBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 9) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 9) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_REFERENCE_DATA_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return Whether the resultReferenceData field is set. + */ + public boolean hasResultReferenceData() { + return kindCase_ == 10; + } + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return The resultReferenceData. + */ + public java.lang.String getResultReferenceData() { + java.lang.Object ref = ""; + if (kindCase_ == 10) { + ref = kind_; + } + 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 (kindCase_ == 10) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return The bytes for resultReferenceData. + */ + public com.google.protobuf.ByteString getResultReferenceDataBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 10) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 10) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 11; + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return kindCase_ == 11; + } + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = ""; + if (kindCase_ == 11) { + ref = kind_; + } + 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 (kindCase_ == 11) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return The bytes for error. + */ + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 11) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 11) { + kind_ = 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 (kindCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_); + } + if (kindCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, kind_); + } + if (kindCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, kind_); + } + if (kindCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, kind_); + } + if (kindCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, kind_); + } + if (kindCase_ == 7) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, kind_); + } + if (kindCase_ == 8) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, kind_); + } + if (kindCase_ == 9) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, kind_); + } + if (kindCase_ == 10) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, kind_); + } + if (kindCase_ == 11) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_); + } + if (kindCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, kind_); + } + if (kindCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, kind_); + } + if (kindCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, kind_); + } + if (kindCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, kind_); + } + if (kindCase_ == 7) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, kind_); + } + if (kindCase_ == 8) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, kind_); + } + if (kindCase_ == 9) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, kind_); + } + if (kindCase_ == 10) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, kind_); + } + if (kindCase_ == 11) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.AnalysisEvent)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.AnalysisEvent other = + (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (!getPlannerReasoning().equals(other.getPlannerReasoning())) return false; + break; + case 3: + if (!getCoderInstruction().equals(other.getCoderInstruction())) return false; + break; + case 4: + if (!getCode().equals(other.getCode())) return false; + break; + case 5: + if (!getExecutionOutput().equals(other.getExecutionOutput())) return false; + break; + case 6: + if (!getExecutionError().equals(other.getExecutionError())) return false; + break; + case 7: + if (!getResultVegaChartJson().equals(other.getResultVegaChartJson())) return false; + break; + case 8: + if (!getResultNaturalLanguage().equals(other.getResultNaturalLanguage())) return false; + break; + case 9: + if (!getResultCsvData().equals(other.getResultCsvData())) return false; + break; + case 10: + if (!getResultReferenceData().equals(other.getResultReferenceData())) return false; + break; + case 11: + if (!getError().equals(other.getError())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 2: + hash = (37 * hash) + PLANNER_REASONING_FIELD_NUMBER; + hash = (53 * hash) + getPlannerReasoning().hashCode(); + break; + case 3: + hash = (37 * hash) + CODER_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getCoderInstruction().hashCode(); + break; + case 4: + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + break; + case 5: + hash = (37 * hash) + EXECUTION_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionOutput().hashCode(); + break; + case 6: + hash = (37 * hash) + EXECUTION_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getExecutionError().hashCode(); + break; + case 7: + hash = (37 * hash) + RESULT_VEGA_CHART_JSON_FIELD_NUMBER; + hash = (53 * hash) + getResultVegaChartJson().hashCode(); + break; + case 8: + hash = (37 * hash) + RESULT_NATURAL_LANGUAGE_FIELD_NUMBER; + hash = (53 * hash) + getResultNaturalLanguage().hashCode(); + break; + case 9: + hash = (37 * hash) + RESULT_CSV_DATA_FIELD_NUMBER; + hash = (53 * hash) + getResultCsvData().hashCode(); + break; + case 10: + hash = (37 * hash) + RESULT_REFERENCE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getResultReferenceData().hashCode(); + break; + case 11: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent 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.geminidataanalytics.v1.AnalysisEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent 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.geminidataanalytics.v1.AnalysisEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.AnalysisEvent 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An event indicating the progress of an analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.AnalysisEvent) + com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.class, + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.AnalysisEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent build() { + com.google.cloud.geminidataanalytics.v1.AnalysisEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent buildPartial() { + com.google.cloud.geminidataanalytics.v1.AnalysisEvent result = + new com.google.cloud.geminidataanalytics.v1.AnalysisEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.AnalysisEvent result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.AnalysisEvent result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.AnalysisEvent) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.AnalysisEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.AnalysisEvent other) { + if (other == com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case PLANNER_REASONING: + { + kindCase_ = 2; + kind_ = other.kind_; + onChanged(); + break; + } + case CODER_INSTRUCTION: + { + kindCase_ = 3; + kind_ = other.kind_; + onChanged(); + break; + } + case CODE: + { + kindCase_ = 4; + kind_ = other.kind_; + onChanged(); + break; + } + case EXECUTION_OUTPUT: + { + kindCase_ = 5; + kind_ = other.kind_; + onChanged(); + break; + } + case EXECUTION_ERROR: + { + kindCase_ = 6; + kind_ = other.kind_; + onChanged(); + break; + } + case RESULT_VEGA_CHART_JSON: + { + kindCase_ = 7; + kind_ = other.kind_; + onChanged(); + break; + } + case RESULT_NATURAL_LANGUAGE: + { + kindCase_ = 8; + kind_ = other.kind_; + onChanged(); + break; + } + case RESULT_CSV_DATA: + { + kindCase_ = 9; + kind_ = other.kind_; + onChanged(); + break; + } + case RESULT_REFERENCE_DATA: + { + kindCase_ = 10; + kind_ = other.kind_; + onChanged(); + break; + } + case ERROR: + { + kindCase_ = 11; + kind_ = other.kind_; + onChanged(); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 2; + kind_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 3; + kind_ = s; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 4; + kind_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 5; + kind_ = s; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 6; + kind_ = s; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 7; + kind_ = s; + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 8; + kind_ = s; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 9; + kind_ = s; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 10; + kind_ = s; + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 11; + kind_ = s; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @return Whether the plannerReasoning field is set. + */ + @java.lang.Override + public boolean hasPlannerReasoning() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @return The plannerReasoning. + */ + @java.lang.Override + public java.lang.String getPlannerReasoning() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 2) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @return The bytes for plannerReasoning. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlannerReasoningBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @param value The plannerReasoning to set. + * @return This builder for chaining. + */ + public Builder setPlannerReasoning(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @return This builder for chaining. + */ + public Builder clearPlannerReasoning() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Python codegen planner's reasoning.
+     * 
+ * + * string planner_reasoning = 2; + * + * @param value The bytes for plannerReasoning to set. + * @return This builder for chaining. + */ + public Builder setPlannerReasoningBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @return Whether the coderInstruction field is set. + */ + @java.lang.Override + public boolean hasCoderInstruction() { + return kindCase_ == 3; + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @return The coderInstruction. + */ + @java.lang.Override + public java.lang.String getCoderInstruction() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 3) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @return The bytes for coderInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCoderInstructionBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @param value The coderInstruction to set. + * @return This builder for chaining. + */ + public Builder setCoderInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @return This builder for chaining. + */ + public Builder clearCoderInstruction() { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Instructions issued for code generation.
+     * 
+ * + * string coder_instruction = 3; + * + * @param value The bytes for coderInstruction to set. + * @return This builder for chaining. + */ + public Builder setCoderInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @return Whether the code field is set. + */ + @java.lang.Override + public boolean hasCode() { + return kindCase_ == 4; + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = ""; + if (kindCase_ == 4) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 4) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 4) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 4) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 4; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Generated code.
+     * 
+ * + * string code = 4; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 4; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @return Whether the executionOutput field is set. + */ + @java.lang.Override + public boolean hasExecutionOutput() { + return kindCase_ == 5; + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @return The executionOutput. + */ + @java.lang.Override + public java.lang.String getExecutionOutput() { + java.lang.Object ref = ""; + if (kindCase_ == 5) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 5) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @return The bytes for executionOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionOutputBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 5) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 5) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @param value The executionOutput to set. + * @return This builder for chaining. + */ + public Builder setExecutionOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 5; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @return This builder for chaining. + */ + public Builder clearExecutionOutput() { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output from code execution.
+     * 
+ * + * string execution_output = 5; + * + * @param value The bytes for executionOutput to set. + * @return This builder for chaining. + */ + public Builder setExecutionOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 5; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @return Whether the executionError field is set. + */ + @java.lang.Override + public boolean hasExecutionError() { + return kindCase_ == 6; + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @return The executionError. + */ + @java.lang.Override + public java.lang.String getExecutionError() { + java.lang.Object ref = ""; + if (kindCase_ == 6) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 6) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @return The bytes for executionError. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionErrorBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 6) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 6) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @param value The executionError to set. + * @return This builder for chaining. + */ + public Builder setExecutionError(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 6; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @return This builder for chaining. + */ + public Builder clearExecutionError() { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * An error from code execution.
+     * 
+ * + * string execution_error = 6; + * + * @param value The bytes for executionError to set. + * @return This builder for chaining. + */ + public Builder setExecutionErrorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 6; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @return Whether the resultVegaChartJson field is set. + */ + @java.lang.Override + public boolean hasResultVegaChartJson() { + return kindCase_ == 7; + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @return The resultVegaChartJson. + */ + @java.lang.Override + public java.lang.String getResultVegaChartJson() { + java.lang.Object ref = ""; + if (kindCase_ == 7) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 7) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @return The bytes for resultVegaChartJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultVegaChartJsonBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 7) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 7) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @param value The resultVegaChartJson to set. + * @return This builder for chaining. + */ + public Builder setResultVegaChartJson(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 7; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @return This builder for chaining. + */ + public Builder clearResultVegaChartJson() { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Result as Vega chart JSON string.
+     * 
+ * + * string result_vega_chart_json = 7; + * + * @param value The bytes for resultVegaChartJson to set. + * @return This builder for chaining. + */ + public Builder setResultVegaChartJsonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 7; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @return Whether the resultNaturalLanguage field is set. + */ + @java.lang.Override + public boolean hasResultNaturalLanguage() { + return kindCase_ == 8; + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @return The resultNaturalLanguage. + */ + @java.lang.Override + public java.lang.String getResultNaturalLanguage() { + java.lang.Object ref = ""; + if (kindCase_ == 8) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 8) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @return The bytes for resultNaturalLanguage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultNaturalLanguageBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 8) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 8) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @param value The resultNaturalLanguage to set. + * @return This builder for chaining. + */ + public Builder setResultNaturalLanguage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 8; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @return This builder for chaining. + */ + public Builder clearResultNaturalLanguage() { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Result as NL string.
+     * 
+ * + * string result_natural_language = 8; + * + * @param value The bytes for resultNaturalLanguage to set. + * @return This builder for chaining. + */ + public Builder setResultNaturalLanguageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 8; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @return Whether the resultCsvData field is set. + */ + @java.lang.Override + public boolean hasResultCsvData() { + return kindCase_ == 9; + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @return The resultCsvData. + */ + @java.lang.Override + public java.lang.String getResultCsvData() { + java.lang.Object ref = ""; + if (kindCase_ == 9) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 9) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @return The bytes for resultCsvData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultCsvDataBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 9) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 9) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @param value The resultCsvData to set. + * @return This builder for chaining. + */ + public Builder setResultCsvData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 9; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @return This builder for chaining. + */ + public Builder clearResultCsvData() { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Result as CSV string.
+     * 
+ * + * string result_csv_data = 9; + * + * @param value The bytes for resultCsvData to set. + * @return This builder for chaining. + */ + public Builder setResultCsvDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 9; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @return Whether the resultReferenceData field is set. + */ + @java.lang.Override + public boolean hasResultReferenceData() { + return kindCase_ == 10; + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @return The resultReferenceData. + */ + @java.lang.Override + public java.lang.String getResultReferenceData() { + java.lang.Object ref = ""; + if (kindCase_ == 10) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 10) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @return The bytes for resultReferenceData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultReferenceDataBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 10) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 10) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @param value The resultReferenceData to set. + * @return This builder for chaining. + */ + public Builder setResultReferenceData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 10; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @return This builder for chaining. + */ + public Builder clearResultReferenceData() { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Result as a reference to a data source.
+     * 
+ * + * string result_reference_data = 10; + * + * @param value The bytes for resultReferenceData to set. + * @return This builder for chaining. + */ + public Builder setResultReferenceDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 10; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return kindCase_ == 11; + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = ""; + if (kindCase_ == 11) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 11) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 11) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 11) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 11; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @return This builder for chaining. + */ + public Builder clearError() { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A generic error message.
+     * 
+ * + * string error = 11; + * + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 11; + kind_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.AnalysisEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.AnalysisEvent) + private static final com.google.cloud.geminidataanalytics.v1.AnalysisEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.AnalysisEvent(); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.AnalysisEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEventOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEventOrBuilder.java new file mode 100644 index 000000000000..6633d2df1586 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisEventOrBuilder.java @@ -0,0 +1,420 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface AnalysisEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.AnalysisEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return Whether the plannerReasoning field is set. + */ + boolean hasPlannerReasoning(); + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return The plannerReasoning. + */ + java.lang.String getPlannerReasoning(); + + /** + * + * + *
+   * Python codegen planner's reasoning.
+   * 
+ * + * string planner_reasoning = 2; + * + * @return The bytes for plannerReasoning. + */ + com.google.protobuf.ByteString getPlannerReasoningBytes(); + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return Whether the coderInstruction field is set. + */ + boolean hasCoderInstruction(); + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return The coderInstruction. + */ + java.lang.String getCoderInstruction(); + + /** + * + * + *
+   * Instructions issued for code generation.
+   * 
+ * + * string coder_instruction = 3; + * + * @return The bytes for coderInstruction. + */ + com.google.protobuf.ByteString getCoderInstructionBytes(); + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return Whether the code field is set. + */ + boolean hasCode(); + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
+   * Generated code.
+   * 
+ * + * string code = 4; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return Whether the executionOutput field is set. + */ + boolean hasExecutionOutput(); + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return The executionOutput. + */ + java.lang.String getExecutionOutput(); + + /** + * + * + *
+   * Output from code execution.
+   * 
+ * + * string execution_output = 5; + * + * @return The bytes for executionOutput. + */ + com.google.protobuf.ByteString getExecutionOutputBytes(); + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return Whether the executionError field is set. + */ + boolean hasExecutionError(); + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return The executionError. + */ + java.lang.String getExecutionError(); + + /** + * + * + *
+   * An error from code execution.
+   * 
+ * + * string execution_error = 6; + * + * @return The bytes for executionError. + */ + com.google.protobuf.ByteString getExecutionErrorBytes(); + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return Whether the resultVegaChartJson field is set. + */ + boolean hasResultVegaChartJson(); + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return The resultVegaChartJson. + */ + java.lang.String getResultVegaChartJson(); + + /** + * + * + *
+   * Result as Vega chart JSON string.
+   * 
+ * + * string result_vega_chart_json = 7; + * + * @return The bytes for resultVegaChartJson. + */ + com.google.protobuf.ByteString getResultVegaChartJsonBytes(); + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return Whether the resultNaturalLanguage field is set. + */ + boolean hasResultNaturalLanguage(); + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return The resultNaturalLanguage. + */ + java.lang.String getResultNaturalLanguage(); + + /** + * + * + *
+   * Result as NL string.
+   * 
+ * + * string result_natural_language = 8; + * + * @return The bytes for resultNaturalLanguage. + */ + com.google.protobuf.ByteString getResultNaturalLanguageBytes(); + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return Whether the resultCsvData field is set. + */ + boolean hasResultCsvData(); + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return The resultCsvData. + */ + java.lang.String getResultCsvData(); + + /** + * + * + *
+   * Result as CSV string.
+   * 
+ * + * string result_csv_data = 9; + * + * @return The bytes for resultCsvData. + */ + com.google.protobuf.ByteString getResultCsvDataBytes(); + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return Whether the resultReferenceData field is set. + */ + boolean hasResultReferenceData(); + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return The resultReferenceData. + */ + java.lang.String getResultReferenceData(); + + /** + * + * + *
+   * Result as a reference to a data source.
+   * 
+ * + * string result_reference_data = 10; + * + * @return The bytes for resultReferenceData. + */ + com.google.protobuf.ByteString getResultReferenceDataBytes(); + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return The error. + */ + java.lang.String getError(); + + /** + * + * + *
+   * A generic error message.
+   * 
+ * + * string error = 11; + * + * @return The bytes for error. + */ + com.google.protobuf.ByteString getErrorBytes(); + + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessage.java new file mode 100644 index 000000000000..46b64838d3e4 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessage.java @@ -0,0 +1,1108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message produced during analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisMessage} + */ +@com.google.protobuf.Generated +public final class AnalysisMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.AnalysisMessage) + AnalysisMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnalysisMessage"); + } + + // Use AnalysisMessage.newBuilder() to construct. + private AnalysisMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnalysisMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.class, + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QUERY(1), + PROGRESS_EVENT(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 QUERY; + case 2: + return PROGRESS_EVENT; + 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 QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery getQuery() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder getQueryOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + + public static final int PROGRESS_EVENT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return Whether the progressEvent field is set. + */ + @java.lang.Override + public boolean hasProgressEvent() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return The progressEvent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent getProgressEvent() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder + getProgressEventOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.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.geminidataanalytics.v1.AnalysisQuery) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_); + } + getUnknownFields().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.geminidataanalytics.v1.AnalysisQuery) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.AnalysisMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.AnalysisMessage other = + (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 2: + if (!getProgressEvent().equals(other.getProgressEvent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + PROGRESS_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getProgressEvent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage 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.geminidataanalytics.v1.AnalysisMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage 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.geminidataanalytics.v1.AnalysisMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.AnalysisMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.AnalysisMessage) + com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.class, + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.AnalysisMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + if (progressEventBuilder_ != null) { + progressEventBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage build() { + com.google.cloud.geminidataanalytics.v1.AnalysisMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.AnalysisMessage result = + new com.google.cloud.geminidataanalytics.v1.AnalysisMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.AnalysisMessage result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.geminidataanalytics.v1.AnalysisMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && queryBuilder_ != null) { + result.kind_ = queryBuilder_.build(); + } + if (kindCase_ == 2 && progressEventBuilder_ != null) { + result.kind_ = progressEventBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.AnalysisMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.AnalysisMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.AnalysisMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case PROGRESS_EVENT: + { + mergeProgressEvent(other.getProgressEvent()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetProgressEventFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisQuery, + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder> + queryBuilder_; + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery getQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return queryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + public Builder setQuery(com.google.cloud.geminidataanalytics.v1.AnalysisQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + public Builder setQuery( + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + public Builder mergeQuery(com.google.cloud.geminidataanalytics.v1.AnalysisQuery value) { + if (queryBuilder_ == null) { + if (kindCase_ == 1 + && kind_ + != com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + queryBuilder_.mergeFrom(value); + } else { + queryBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + queryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder getQueryBuilder() { + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder getQueryOrBuilder() { + if ((kindCase_ == 1) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An analysis query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisQuery, + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisQuery, + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return queryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisEvent, + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder> + progressEventBuilder_; + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return Whether the progressEvent field is set. + */ + @java.lang.Override + public boolean hasProgressEvent() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return The progressEvent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent getProgressEvent() { + if (progressEventBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return progressEventBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + public Builder setProgressEvent(com.google.cloud.geminidataanalytics.v1.AnalysisEvent value) { + if (progressEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + progressEventBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + public Builder setProgressEvent( + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder builderForValue) { + if (progressEventBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + progressEventBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + public Builder mergeProgressEvent(com.google.cloud.geminidataanalytics.v1.AnalysisEvent value) { + if (progressEventBuilder_ == null) { + if (kindCase_ == 2 + && kind_ + != com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.newBuilder( + (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + progressEventBuilder_.mergeFrom(value); + } else { + progressEventBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + public Builder clearProgressEvent() { + if (progressEventBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + progressEventBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder getProgressEventBuilder() { + return internalGetProgressEventFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder + getProgressEventOrBuilder() { + if ((kindCase_ == 2) && (progressEventBuilder_ != null)) { + return progressEventBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An event indicating the progress of the analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisEvent, + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder> + internalGetProgressEventFieldBuilder() { + if (progressEventBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.geminidataanalytics.v1.AnalysisEvent.getDefaultInstance(); + } + progressEventBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisEvent, + com.google.cloud.geminidataanalytics.v1.AnalysisEvent.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.AnalysisEvent) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return progressEventBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.AnalysisMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.AnalysisMessage) + private static final com.google.cloud.geminidataanalytics.v1.AnalysisMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.AnalysisMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.AnalysisMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessageOrBuilder.java new file mode 100644 index 000000000000..a589065038af --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisMessageOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface AnalysisMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.AnalysisMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + * + * @return The query. + */ + com.google.cloud.geminidataanalytics.v1.AnalysisQuery getQuery(); + + /** + * + * + *
+   * An analysis query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisQuery query = 1; + */ + com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return Whether the progressEvent field is set. + */ + boolean hasProgressEvent(); + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + * + * @return The progressEvent. + */ + com.google.cloud.geminidataanalytics.v1.AnalysisEvent getProgressEvent(); + + /** + * + * + *
+   * An event indicating the progress of the analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisEvent progress_event = 2; + */ + com.google.cloud.geminidataanalytics.v1.AnalysisEventOrBuilder getProgressEventOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptions.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptions.java new file mode 100644 index 000000000000..4ee3b72a883f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptions.java @@ -0,0 +1,1243 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Options for analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisOptions} + */ +@com.google.protobuf.Generated +public final class AnalysisOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.AnalysisOptions) + AnalysisOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnalysisOptions"); + } + + // Use AnalysisOptions.newBuilder() to construct. + private AnalysisOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnalysisOptions() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.class, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder.class); + } + + public interface PythonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Whether to enable Python analysis.
+     * Defaults to false.
+     * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + boolean getEnabled(); + } + + /** + * + * + *
+   * Options for Python analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisOptions.Python} + */ + public static final class Python extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) + PythonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Python"); + } + + // Use Python.newBuilder() to construct. + private Python(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Python() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.class, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + + /** + * + * + *
+     * Optional. Whether to enable Python analysis.
+     * Defaults to false.
+     * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + size += getUnknownFields().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.geminidataanalytics.v1.AnalysisOptions.Python)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python other = + (com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python 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.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python 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.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.AnalysisOptions.Python 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Options for Python analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisOptions.Python} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.class, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python build() { + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python buildPartial() { + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python result = + new com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python other) { + if (other + == com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance()) + return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enabled_; + + /** + * + * + *
+       * Optional. Whether to enable Python analysis.
+       * Defaults to false.
+       * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + /** + * + * + *
+       * Optional. Whether to enable Python analysis.
+       * Defaults to false.
+       * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Whether to enable Python analysis.
+       * Defaults to false.
+       * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.AnalysisOptions.Python) + private static final com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python(); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Python parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.AnalysisOptions.Python + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PYTHON_FIELD_NUMBER = 1; + private com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python_; + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the python field is set. + */ + @java.lang.Override + public boolean hasPython() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The python. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python getPython() { + return python_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance() + : python_; + } + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder + getPythonOrBuilder() { + return python_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance() + : python_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPython()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPython()); + } + size += getUnknownFields().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.geminidataanalytics.v1.AnalysisOptions)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.AnalysisOptions other = + (com.google.cloud.geminidataanalytics.v1.AnalysisOptions) obj; + + if (hasPython() != other.hasPython()) return false; + if (hasPython()) { + if (!getPython().equals(other.getPython())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPython()) { + hash = (37 * hash) + PYTHON_FIELD_NUMBER; + hash = (53 * hash) + getPython().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions 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.geminidataanalytics.v1.AnalysisOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions 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.geminidataanalytics.v1.AnalysisOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.AnalysisOptions 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Options for analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.AnalysisOptions) + com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.class, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.AnalysisOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPythonFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + python_ = null; + if (pythonBuilder_ != null) { + pythonBuilder_.dispose(); + pythonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions build() { + com.google.cloud.geminidataanalytics.v1.AnalysisOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions buildPartial() { + com.google.cloud.geminidataanalytics.v1.AnalysisOptions result = + new com.google.cloud.geminidataanalytics.v1.AnalysisOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.AnalysisOptions result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.python_ = pythonBuilder_ == null ? python_ : pythonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.AnalysisOptions) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.AnalysisOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.AnalysisOptions other) { + if (other == com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance()) + return this; + if (other.hasPython()) { + mergePython(other.getPython()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetPythonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder> + pythonBuilder_; + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the python field is set. + */ + public boolean hasPython() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The python. + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python getPython() { + if (pythonBuilder_ == null) { + return python_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance() + : python_; + } else { + return pythonBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPython(com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python value) { + if (pythonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + python_ = value; + } else { + pythonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPython( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder builderForValue) { + if (pythonBuilder_ == null) { + python_ = builderForValue.build(); + } else { + pythonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePython( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python value) { + if (pythonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && python_ != null + && python_ + != com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python + .getDefaultInstance()) { + getPythonBuilder().mergeFrom(value); + } else { + python_ = value; + } + } else { + pythonBuilder_.mergeFrom(value); + } + if (python_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPython() { + bitField0_ = (bitField0_ & ~0x00000001); + python_ = null; + if (pythonBuilder_ != null) { + pythonBuilder_.dispose(); + pythonBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder + getPythonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPythonFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder + getPythonOrBuilder() { + if (pythonBuilder_ != null) { + return pythonBuilder_.getMessageOrBuilder(); + } else { + return python_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.getDefaultInstance() + : python_; + } + } + + /** + * + * + *
+     * Optional. Options for Python analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder> + internalGetPythonFieldBuilder() { + if (pythonBuilder_ == null) { + pythonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder>( + getPython(), getParentForChildren(), isClean()); + python_ = null; + } + return pythonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.AnalysisOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.AnalysisOptions) + private static final com.google.cloud.geminidataanalytics.v1.AnalysisOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.AnalysisOptions(); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.AnalysisOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptionsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptionsOrBuilder.java new file mode 100644 index 000000000000..103dfc895322 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisOptionsOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface AnalysisOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.AnalysisOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the python field is set. + */ + boolean hasPython(); + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The python. + */ + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Python getPython(); + + /** + * + * + *
+   * Optional. Options for Python analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions.Python python = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.PythonOrBuilder getPythonOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQuery.java new file mode 100644 index 000000000000..1f3b764ecdc4 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQuery.java @@ -0,0 +1,887 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query for performing an analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisQuery} + */ +@com.google.protobuf.Generated +public final class AnalysisQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.AnalysisQuery) + AnalysisQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnalysisQuery"); + } + + // Use AnalysisQuery.newBuilder() to construct. + private AnalysisQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnalysisQuery() { + question_ = ""; + dataResultNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.class, + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder.class); + } + + public static final int QUESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object question_ = ""; + + /** + * + * + *
+   * Optional. An analysis question to help answer the user's original question.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + @java.lang.Override + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + 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(); + question_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An analysis question to help answer the user's original question.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_RESULT_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataResultNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the dataResultNames. + */ + public com.google.protobuf.ProtocolStringList getDataResultNamesList() { + return dataResultNames_; + } + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of dataResultNames. + */ + public int getDataResultNamesCount() { + return dataResultNames_.size(); + } + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The dataResultNames at the given index. + */ + public java.lang.String getDataResultNames(int index) { + return dataResultNames_.get(index); + } + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the dataResultNames at the given index. + */ + public com.google.protobuf.ByteString getDataResultNamesBytes(int index) { + return dataResultNames_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, question_); + } + for (int i = 0; i < dataResultNames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataResultNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, question_); + } + { + int dataSize = 0; + for (int i = 0; i < dataResultNames_.size(); i++) { + dataSize += computeStringSizeNoTag(dataResultNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataResultNamesList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.AnalysisQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.AnalysisQuery other = + (com.google.cloud.geminidataanalytics.v1.AnalysisQuery) obj; + + if (!getQuestion().equals(other.getQuestion())) return false; + if (!getDataResultNamesList().equals(other.getDataResultNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUESTION_FIELD_NUMBER; + hash = (53 * hash) + getQuestion().hashCode(); + if (getDataResultNamesCount() > 0) { + hash = (37 * hash) + DATA_RESULT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDataResultNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery 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.geminidataanalytics.v1.AnalysisQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery 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.geminidataanalytics.v1.AnalysisQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.AnalysisQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query for performing an analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.AnalysisQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.AnalysisQuery) + com.google.cloud.geminidataanalytics.v1.AnalysisQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.class, + com.google.cloud.geminidataanalytics.v1.AnalysisQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.AnalysisQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + question_ = ""; + dataResultNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery build() { + com.google.cloud.geminidataanalytics.v1.AnalysisQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.AnalysisQuery result = + new com.google.cloud.geminidataanalytics.v1.AnalysisQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.AnalysisQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.question_ = question_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + dataResultNames_.makeImmutable(); + result.dataResultNames_ = dataResultNames_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.AnalysisQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.AnalysisQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.AnalysisQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.AnalysisQuery.getDefaultInstance()) + return this; + if (!other.getQuestion().isEmpty()) { + question_ = other.question_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.dataResultNames_.isEmpty()) { + if (dataResultNames_.isEmpty()) { + dataResultNames_ = other.dataResultNames_; + bitField0_ |= 0x00000002; + } else { + ensureDataResultNamesIsMutable(); + dataResultNames_.addAll(other.dataResultNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + question_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataResultNamesIsMutable(); + dataResultNames_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object question_ = ""; + + /** + * + * + *
+     * Optional. An analysis question to help answer the user's original question.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + question_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An analysis question to help answer the user's original question.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An analysis question to help answer the user's original question.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The question to set. + * @return This builder for chaining. + */ + public Builder setQuestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + question_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An analysis question to help answer the user's original question.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQuestion() { + question_ = getDefaultInstance().getQuestion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An analysis question to help answer the user's original question.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for question to set. + * @return This builder for chaining. + */ + public Builder setQuestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + question_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList dataResultNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataResultNamesIsMutable() { + if (!dataResultNames_.isModifiable()) { + dataResultNames_ = new com.google.protobuf.LazyStringArrayList(dataResultNames_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the dataResultNames. + */ + public com.google.protobuf.ProtocolStringList getDataResultNamesList() { + dataResultNames_.makeImmutable(); + return dataResultNames_; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of dataResultNames. + */ + public int getDataResultNamesCount() { + return dataResultNames_.size(); + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The dataResultNames at the given index. + */ + public java.lang.String getDataResultNames(int index) { + return dataResultNames_.get(index); + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the dataResultNames at the given index. + */ + public com.google.protobuf.ByteString getDataResultNamesBytes(int index) { + return dataResultNames_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The dataResultNames to set. + * @return This builder for chaining. + */ + public Builder setDataResultNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataResultNamesIsMutable(); + dataResultNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataResultNames to add. + * @return This builder for chaining. + */ + public Builder addDataResultNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataResultNamesIsMutable(); + dataResultNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The dataResultNames to add. + * @return This builder for chaining. + */ + public Builder addAllDataResultNames(java.lang.Iterable values) { + ensureDataResultNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataResultNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataResultNames() { + dataResultNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The names of previously retrieved data results to analyze.
+     * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the dataResultNames to add. + * @return This builder for chaining. + */ + public Builder addDataResultNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataResultNamesIsMutable(); + dataResultNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.AnalysisQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.AnalysisQuery) + private static final com.google.cloud.geminidataanalytics.v1.AnalysisQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.AnalysisQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.AnalysisQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.AnalysisQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQueryOrBuilder.java new file mode 100644 index 000000000000..bf40b4b31c47 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/AnalysisQueryOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface AnalysisQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.AnalysisQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. An analysis question to help answer the user's original question.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + java.lang.String getQuestion(); + + /** + * + * + *
+   * Optional. An analysis question to help answer the user's original question.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + com.google.protobuf.ByteString getQuestionBytes(); + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the dataResultNames. + */ + java.util.List getDataResultNamesList(); + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of dataResultNames. + */ + int getDataResultNamesCount(); + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The dataResultNames at the given index. + */ + java.lang.String getDataResultNames(int index); + + /** + * + * + *
+   * Optional. The names of previously retrieved data results to analyze.
+   * 
+ * + * repeated string data_result_names = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the dataResultNames at the given index. + */ + com.google.protobuf.ByteString getDataResultNamesBytes(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJob.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJob.java new file mode 100644 index 000000000000..0ff6f3c6176b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJob.java @@ -0,0 +1,1739 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A BigQuery job executed by the system.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryJob} + */ +@com.google.protobuf.Generated +public final class BigQueryJob extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryJob) + BigQueryJobOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryJob"); + } + + // Use BigQueryJob.newBuilder() to construct. + private BigQueryJob(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryJob() { + projectId_ = ""; + jobId_ = ""; + location_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryJob.class, + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * Required. The project that the job belongs to.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The project that the job belongs to.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object jobId_ = ""; + + /** + * + * + *
+   * Required. The ID of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + 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(); + jobId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Optional. The location of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The location of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_TABLE_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.BigQueryTableReference destinationTable_; + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the destinationTable field is set. + */ + @java.lang.Override + public boolean hasDestinationTable() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The destinationTable. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getDestinationTable() { + return destinationTable_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance() + : destinationTable_; + } + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getDestinationTableOrBuilder() { + return destinationTable_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance() + : destinationTable_; + } + + public static final int SCHEMA_FIELD_NUMBER = 7; + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jobId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, jobId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDestinationTable()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, location_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jobId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, jobId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDestinationTable()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, location_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSchema()); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryJob)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryJob other = + (com.google.cloud.geminidataanalytics.v1.BigQueryJob) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getJobId().equals(other.getJobId())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (hasDestinationTable() != other.hasDestinationTable()) return false; + if (hasDestinationTable()) { + if (!getDestinationTable().equals(other.getDestinationTable())) return false; + } + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + if (hasDestinationTable()) { + hash = (37 * hash) + DESTINATION_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationTable().hashCode(); + } + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob 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.geminidataanalytics.v1.BigQueryJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob 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.geminidataanalytics.v1.BigQueryJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryJob 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A BigQuery job executed by the system.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryJob) + com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryJob.class, + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.BigQueryJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDestinationTableFieldBuilder(); + internalGetSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + jobId_ = ""; + location_ = ""; + destinationTable_ = null; + if (destinationTableBuilder_ != null) { + destinationTableBuilder_.dispose(); + destinationTableBuilder_ = null; + } + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJob getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJob build() { + com.google.cloud.geminidataanalytics.v1.BigQueryJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJob buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryJob result = + new com.google.cloud.geminidataanalytics.v1.BigQueryJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.BigQueryJob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.jobId_ = jobId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.destinationTable_ = + destinationTableBuilder_ == null ? destinationTable_ : destinationTableBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryJob) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.BigQueryJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.BigQueryJob other) { + if (other == com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDestinationTable()) { + mergeDestinationTable(other.getDestinationTable()); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + jobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDestinationTableFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 42: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 58: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + + /** + * + * + *
+     * Required. The project that the job belongs to.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The project that the job belongs to.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The project that the job belongs to.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the job belongs to.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the job belongs to.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object jobId_ = ""; + + /** + * + * + *
+     * Required. The ID of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + jobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + jobId_ = getDefaultInstance().getJobId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + jobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Optional. The location of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The location of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The location of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location of the job.
+     *
+     * See
+     * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+     * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.BigQueryTableReference destinationTable_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + destinationTableBuilder_; + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the destinationTable field is set. + */ + public boolean hasDestinationTable() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The destinationTable. + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getDestinationTable() { + if (destinationTableBuilder_ == null) { + return destinationTable_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance() + : destinationTable_; + } else { + return destinationTableBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDestinationTable( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (destinationTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destinationTable_ = value; + } else { + destinationTableBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDestinationTable( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder builderForValue) { + if (destinationTableBuilder_ == null) { + destinationTable_ = builderForValue.build(); + } else { + destinationTableBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDestinationTable( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (destinationTableBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && destinationTable_ != null + && destinationTable_ + != com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + .getDefaultInstance()) { + getDestinationTableBuilder().mergeFrom(value); + } else { + destinationTable_ = value; + } + } else { + destinationTableBuilder_.mergeFrom(value); + } + if (destinationTable_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDestinationTable() { + bitField0_ = (bitField0_ & ~0x00000008); + destinationTable_ = null; + if (destinationTableBuilder_ != null) { + destinationTableBuilder_.dispose(); + destinationTableBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder + getDestinationTableBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetDestinationTableFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getDestinationTableOrBuilder() { + if (destinationTableBuilder_ != null) { + return destinationTableBuilder_.getMessageOrBuilder(); + } else { + return destinationTable_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance() + : destinationTable_; + } + } + + /** + * + * + *
+     * Optional. A reference to the destination table of the job's query results.
+     *
+     * See
+     * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + internalGetDestinationTableFieldBuilder() { + if (destinationTableBuilder_ == null) { + destinationTableBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder>( + getDestinationTable(), getParentForChildren(), isClean()); + destinationTable_ = null; + } + return destinationTableBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && schema_ != null + && schema_ != com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000010); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + } + + /** + * + * + *
+     * Optional. The schema of the job's query results.
+     *
+     * See
+     * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryJob) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryJob(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJobOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJobOrBuilder.java new file mode 100644 index 000000000000..195b836ecd86 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryJobOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project that the job belongs to.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * Required. The project that the job belongs to.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The ID of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + java.lang.String getJobId(); + + /** + * + * + *
+   * Required. The ID of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString getJobIdBytes(); + + /** + * + * + *
+   * Optional. The location of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Optional. The location of the job.
+   *
+   * See
+   * [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference).
+   * 
+ * + * string location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the destinationTable field is set. + */ + boolean hasDestinationTable(); + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The destinationTable. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getDestinationTable(); + + /** + * + * + *
+   * Optional. A reference to the destination table of the job's query results.
+   *
+   * See
+   * [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference destination_table = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getDestinationTableOrBuilder(); + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.Schema getSchema(); + + /** + * + * + *
+   * Optional. The schema of the job's query results.
+   *
+   * See
+   * [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReference.java new file mode 100644 index 000000000000..82f97bd57037 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReference.java @@ -0,0 +1,987 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing a reference to a single BigQuery property graph.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference} + */ +@com.google.protobuf.Generated +public final class BigQueryPropertyGraphReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + BigQueryPropertyGraphReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryPropertyGraphReference"); + } + + // Use BigQueryPropertyGraphReference.newBuilder() to construct. + private BigQueryPropertyGraphReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryPropertyGraphReference() { + projectId_ = ""; + datasetId_ = ""; + propertyGraphId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * Required. The project that the property graph belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The project that the property graph belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + + /** + * + * + *
+   * Required. The dataset that the property graph belongs to.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + 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(); + datasetId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The dataset that the property graph belongs to.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTY_GRAPH_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object propertyGraphId_ = ""; + + /** + * + * + *
+   * Required. The property graph id.
+   * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The propertyGraphId. + */ + @java.lang.Override + public java.lang.String getPropertyGraphId() { + java.lang.Object ref = propertyGraphId_; + 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(); + propertyGraphId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The property graph id.
+   * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for propertyGraphId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyGraphIdBytes() { + java.lang.Object ref = propertyGraphId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + propertyGraphId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(propertyGraphId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, propertyGraphId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(propertyGraphId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, propertyGraphId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryPropertyGraphReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference other = + (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getPropertyGraphId().equals(other.getPropertyGraphId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + PROPERTY_GRAPH_ID_FIELD_NUMBER; + hash = (53 * hash) + getPropertyGraphId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference 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.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference 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.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryPropertyGraphReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing a reference to a single BigQuery property graph.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + datasetId_ = ""; + propertyGraphId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference build() { + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference result = + new com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasetId_ = datasetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.propertyGraphId_ = propertyGraphId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPropertyGraphId().isEmpty()) { + propertyGraphId_ = other.propertyGraphId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + datasetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + propertyGraphId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + + /** + * + * + *
+     * Required. The project that the property graph belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The project that the property graph belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The project that the property graph belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the property graph belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the property graph belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + + /** + * + * + *
+     * Required. The dataset that the property graph belongs to.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The dataset that the property graph belongs to.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The dataset that the property graph belongs to.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The dataset that the property graph belongs to.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The dataset that the property graph belongs to.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object propertyGraphId_ = ""; + + /** + * + * + *
+     * Required. The property graph id.
+     * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The propertyGraphId. + */ + public java.lang.String getPropertyGraphId() { + java.lang.Object ref = propertyGraphId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + propertyGraphId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The property graph id.
+     * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for propertyGraphId. + */ + public com.google.protobuf.ByteString getPropertyGraphIdBytes() { + java.lang.Object ref = propertyGraphId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + propertyGraphId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The property graph id.
+     * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The propertyGraphId to set. + * @return This builder for chaining. + */ + public Builder setPropertyGraphId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + propertyGraphId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The property graph id.
+     * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPropertyGraphId() { + propertyGraphId_ = getDefaultInstance().getPropertyGraphId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The property graph id.
+     * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for propertyGraphId to set. + * @return This builder for chaining. + */ + public Builder setPropertyGraphIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + propertyGraphId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryPropertyGraphReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryPropertyGraphReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReferenceOrBuilder.java new file mode 100644 index 000000000000..f86f44da7135 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryPropertyGraphReferenceOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryPropertyGraphReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project that the property graph belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * Required. The project that the property graph belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The dataset that the property graph belongs to.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + + /** + * + * + *
+   * Required. The dataset that the property graph belongs to.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * Required. The property graph id.
+   * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The propertyGraphId. + */ + java.lang.String getPropertyGraphId(); + + /** + * + * + *
+   * Required. The property graph id.
+   * 
+ * + * string property_graph_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for propertyGraphId. + */ + com.google.protobuf.ByteString getPropertyGraphIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutine.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutine.java new file mode 100644 index 000000000000..6334eed638ec --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutine.java @@ -0,0 +1,917 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A reference to a BigQuery routine.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryRoutine} + */ +@com.google.protobuf.Generated +public final class BigQueryRoutine extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryRoutine) + BigQueryRoutineOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryRoutine"); + } + + // Use BigQueryRoutine.newBuilder() to construct. + private BigQueryRoutine(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryRoutine() { + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.class, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder.class); + } + + private int bitField0_; + public static final int ROUTINE_REFERENCE_FIELD_NUMBER = 1; + private com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routineReference_; + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return Whether the routineReference field is set. + */ + @java.lang.Override + public boolean hasRoutineReference() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return The routineReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference getRoutineReference() { + return routineReference_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance() + : routineReference_; + } + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder + getRoutineReferenceOrBuilder() { + return routineReference_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance() + : routineReference_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * User override or addition to description, to tell the agent when to use the
+   * UDF.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * User override or addition to description, to tell the agent when to use the
+   * UDF.
+   * 
+ * + * 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getRoutineReference()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRoutineReference()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryRoutine)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine other = + (com.google.cloud.geminidataanalytics.v1.BigQueryRoutine) obj; + + if (hasRoutineReference() != other.hasRoutineReference()) return false; + if (hasRoutineReference()) { + if (!getRoutineReference().equals(other.getRoutineReference())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRoutineReference()) { + hash = (37 * hash) + ROUTINE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getRoutineReference().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine 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.geminidataanalytics.v1.BigQueryRoutine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine 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.geminidataanalytics.v1.BigQueryRoutine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryRoutine 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A reference to a BigQuery routine.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryRoutine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryRoutine) + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.class, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRoutineReferenceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + routineReference_ = null; + if (routineReferenceBuilder_ != null) { + routineReferenceBuilder_.dispose(); + routineReferenceBuilder_ = null; + } + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine build() { + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine result = + new com.google.cloud.geminidataanalytics.v1.BigQueryRoutine(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.BigQueryRoutine result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.routineReference_ = + routineReferenceBuilder_ == null ? routineReference_ : routineReferenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryRoutine) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.BigQueryRoutine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.BigQueryRoutine other) { + if (other == com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.getDefaultInstance()) + return this; + if (other.hasRoutineReference()) { + mergeRoutineReference(other.getRoutineReference()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetRoutineReferenceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routineReference_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder> + routineReferenceBuilder_; + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return Whether the routineReference field is set. + */ + public boolean hasRoutineReference() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return The routineReference. + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference getRoutineReference() { + if (routineReferenceBuilder_ == null) { + return routineReference_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance() + : routineReference_; + } else { + return routineReferenceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public Builder setRoutineReference( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference value) { + if (routineReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routineReference_ = value; + } else { + routineReferenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public Builder setRoutineReference( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder builderForValue) { + if (routineReferenceBuilder_ == null) { + routineReference_ = builderForValue.build(); + } else { + routineReferenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public Builder mergeRoutineReference( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference value) { + if (routineReferenceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && routineReference_ != null + && routineReference_ + != com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference + .getDefaultInstance()) { + getRoutineReferenceBuilder().mergeFrom(value); + } else { + routineReference_ = value; + } + } else { + routineReferenceBuilder_.mergeFrom(value); + } + if (routineReference_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public Builder clearRoutineReference() { + bitField0_ = (bitField0_ & ~0x00000001); + routineReference_ = null; + if (routineReferenceBuilder_ != null) { + routineReferenceBuilder_.dispose(); + routineReferenceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder + getRoutineReferenceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetRoutineReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder + getRoutineReferenceOrBuilder() { + if (routineReferenceBuilder_ != null) { + return routineReferenceBuilder_.getMessageOrBuilder(); + } else { + return routineReference_ == null + ? com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance() + : routineReference_; + } + } + + /** + * + * + *
+     * The reference to the BigQuery routine.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder> + internalGetRoutineReferenceFieldBuilder() { + if (routineReferenceBuilder_ == null) { + routineReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder>( + getRoutineReference(), getParentForChildren(), isClean()); + routineReference_ = null; + } + return routineReferenceBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * User override or addition to description, to tell the agent when to use the
+     * UDF.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * User override or addition to description, to tell the agent when to use the
+     * UDF.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * User override or addition to description, to tell the agent when to use the
+     * UDF.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * User override or addition to description, to tell the agent when to use the
+     * UDF.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * User override or addition to description, to tell the agent when to use the
+     * UDF.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryRoutine) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryRoutine) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryRoutine DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryRoutine(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutine getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryRoutine parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryRoutine getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineOrBuilder.java new file mode 100644 index 000000000000..365967488752 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryRoutineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryRoutine) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return Whether the routineReference field is set. + */ + boolean hasRoutineReference(); + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + * + * @return The routineReference. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference getRoutineReference(); + + /** + * + * + *
+   * The reference to the BigQuery routine.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryRoutineReference routine_reference = 1; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder + getRoutineReferenceOrBuilder(); + + /** + * + * + *
+   * User override or addition to description, to tell the agent when to use the
+   * UDF.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * User override or addition to description, to tell the agent when to use the
+   * UDF.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReference.java new file mode 100644 index 000000000000..f43466d65ad2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReference.java @@ -0,0 +1,982 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A reference to a BigQuery routine.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryRoutineReference} + */ +@com.google.protobuf.Generated +public final class BigQueryRoutineReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) + BigQueryRoutineReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryRoutineReference"); + } + + // Use BigQueryRoutineReference.newBuilder() to construct. + private BigQueryRoutineReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryRoutineReference() { + projectId_ = ""; + datasetId_ = ""; + routineId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * The project ID of the routine.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * The project ID of the routine.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + + /** + * + * + *
+   * The dataset ID of the routine.
+   * 
+ * + * string dataset_id = 2; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + 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(); + datasetId_ = s; + return s; + } + } + + /** + * + * + *
+   * The dataset ID of the routine.
+   * 
+ * + * string dataset_id = 2; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUTINE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object routineId_ = ""; + + /** + * + * + *
+   * The routine ID of the routine.
+   * 
+ * + * string routine_id = 3; + * + * @return The routineId. + */ + @java.lang.Override + public java.lang.String getRoutineId() { + java.lang.Object ref = routineId_; + 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(); + routineId_ = s; + return s; + } + } + + /** + * + * + *
+   * The routine ID of the routine.
+   * 
+ * + * string routine_id = 3; + * + * @return The bytes for routineId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoutineIdBytes() { + java.lang.Object ref = routineId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routineId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(routineId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, routineId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(routineId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, routineId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryRoutineReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference other = + (com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getRoutineId().equals(other.getRoutineId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + ROUTINE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRoutineId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference 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.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference 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.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryRoutineReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A reference to a BigQuery routine.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryRoutineReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + datasetId_ = ""; + routineId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference build() { + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference result = + new com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasetId_ = datasetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.routineId_ = routineId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRoutineId().isEmpty()) { + routineId_ = other.routineId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + datasetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + routineId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + + /** + * + * + *
+     * The project ID of the routine.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The project ID of the routine.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The project ID of the routine.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The project ID of the routine.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The project ID of the routine.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + + /** + * + * + *
+     * The dataset ID of the routine.
+     * 
+ * + * string dataset_id = 2; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The dataset ID of the routine.
+     * 
+ * + * string dataset_id = 2; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The dataset ID of the routine.
+     * 
+ * + * string dataset_id = 2; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The dataset ID of the routine.
+     * 
+ * + * string dataset_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The dataset ID of the routine.
+     * 
+ * + * string dataset_id = 2; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object routineId_ = ""; + + /** + * + * + *
+     * The routine ID of the routine.
+     * 
+ * + * string routine_id = 3; + * + * @return The routineId. + */ + public java.lang.String getRoutineId() { + java.lang.Object ref = routineId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + routineId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The routine ID of the routine.
+     * 
+ * + * string routine_id = 3; + * + * @return The bytes for routineId. + */ + public com.google.protobuf.ByteString getRoutineIdBytes() { + java.lang.Object ref = routineId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routineId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The routine ID of the routine.
+     * 
+ * + * string routine_id = 3; + * + * @param value The routineId to set. + * @return This builder for chaining. + */ + public Builder setRoutineId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + routineId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The routine ID of the routine.
+     * 
+ * + * string routine_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRoutineId() { + routineId_ = getDefaultInstance().getRoutineId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The routine ID of the routine.
+     * 
+ * + * string routine_id = 3; + * + * @param value The bytes for routineId to set. + * @return This builder for chaining. + */ + public Builder setRoutineIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + routineId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryRoutineReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryRoutineReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryRoutineReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReferenceOrBuilder.java new file mode 100644 index 000000000000..1895e33e7915 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryRoutineReferenceOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryRoutineReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryRoutineReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project ID of the routine.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * The project ID of the routine.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * The dataset ID of the routine.
+   * 
+ * + * string dataset_id = 2; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + + /** + * + * + *
+   * The dataset ID of the routine.
+   * 
+ * + * string dataset_id = 2; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * The routine ID of the routine.
+   * 
+ * + * string routine_id = 3; + * + * @return The routineId. + */ + java.lang.String getRoutineId(); + + /** + * + * + *
+   * The routine ID of the routine.
+   * 
+ * + * string routine_id = 3; + * + * @return The bytes for routineId. + */ + com.google.protobuf.ByteString getRoutineIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReference.java new file mode 100644 index 000000000000..ccf9f6777388 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReference.java @@ -0,0 +1,1297 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing a reference to a single BigQuery table.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryTableReference} + */ +@com.google.protobuf.Generated +public final class BigQueryTableReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryTableReference) + BigQueryTableReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryTableReference"); + } + + // Use BigQueryTableReference.newBuilder() to construct. + private BigQueryTableReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryTableReference() { + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * Required. The project that the table belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The project that the table belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + + /** + * + * + *
+   * Required. The dataset that the table belongs to.
+   * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + 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(); + datasetId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The dataset that the table belongs to.
+   * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableId_ = ""; + + /** + * + * + *
+   * Required. The table id.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + 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(); + tableId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The table id.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 6; + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, tableId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, datasetId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, tableId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSchema()); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryTableReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference other = + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference 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.geminidataanalytics.v1.BigQueryTableReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference 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.geminidataanalytics.v1.BigQueryTableReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryTableReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing a reference to a single BigQuery table.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryTableReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryTableReference) + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.class, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference build() { + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference result = + new com.google.cloud.geminidataanalytics.v1.BigQueryTableReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasetId_ = datasetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tableId_ = tableId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.BigQueryTableReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + datasetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + tableId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 50: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + + /** + * + * + *
+     * Required. The project that the table belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The project that the table belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The project that the table belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the table belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project that the table belongs to.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + + /** + * + * + *
+     * Required. The dataset that the table belongs to.
+     * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The dataset that the table belongs to.
+     * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The dataset that the table belongs to.
+     * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The dataset that the table belongs to.
+     * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The dataset that the table belongs to.
+     * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + + /** + * + * + *
+     * Required. The table id.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The table id.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The table id.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The table id.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + tableId_ = getDefaultInstance().getTableId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The table id.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && schema_ != null + && schema_ != com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000008); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryTableReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryTableReference) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryTableReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryTableReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryTableReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferenceOrBuilder.java new file mode 100644 index 000000000000..f3a5407df5f7 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferenceOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryTableReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryTableReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project that the table belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * Required. The project that the table belongs to.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The dataset that the table belongs to.
+   * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + + /** + * + * + *
+   * Required. The dataset that the table belongs to.
+   * 
+ * + * string dataset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * Required. The table id.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + java.lang.String getTableId(); + + /** + * + * + *
+   * Required. The table id.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.Schema getSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferences.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferences.java new file mode 100644 index 000000000000..280faa39529f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferences.java @@ -0,0 +1,1008 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing references to BigQuery tables and property graphs.
+ * At least one of `table_references`, `property_graph_references`, or
+ * `search_scope` must be populated.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryTableReferences} + */ +@com.google.protobuf.Generated +public final class BigQueryTableReferences extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.BigQueryTableReferences) + BigQueryTableReferencesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryTableReferences"); + } + + // Use BigQueryTableReferences.newBuilder() to construct. + private BigQueryTableReferences(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigQueryTableReferences() { + tableReferences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.class, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder.class); + } + + public static final int TABLE_REFERENCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + tableReferences_; + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getTableReferencesList() { + return tableReferences_; + } + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + getTableReferencesOrBuilderList() { + return tableReferences_; + } + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getTableReferencesCount() { + return tableReferences_.size(); + } + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getTableReferences( + int index) { + return tableReferences_.get(index); + } + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getTableReferencesOrBuilder(int index) { + return tableReferences_.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 < tableReferences_.size(); i++) { + output.writeMessage(1, tableReferences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tableReferences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tableReferences_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.BigQueryTableReferences)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences other = + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) obj; + + if (!getTableReferencesList().equals(other.getTableReferencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTableReferencesCount() > 0) { + hash = (37 * hash) + TABLE_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getTableReferencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences 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.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences 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.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.BigQueryTableReferences 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing references to BigQuery tables and property graphs.
+   * At least one of `table_references`, `property_graph_references`, or
+   * `search_scope` must be populated.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.BigQueryTableReferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.BigQueryTableReferences) + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.class, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tableReferencesBuilder_ == null) { + tableReferences_ = java.util.Collections.emptyList(); + } else { + tableReferences_ = null; + tableReferencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences build() { + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences buildPartial() { + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences result = + new com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences result) { + if (tableReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tableReferences_ = java.util.Collections.unmodifiableList(tableReferences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tableReferences_ = tableReferences_; + } else { + result.tableReferences_ = tableReferencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences other) { + if (other + == com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance()) + return this; + if (tableReferencesBuilder_ == null) { + if (!other.tableReferences_.isEmpty()) { + if (tableReferences_.isEmpty()) { + tableReferences_ = other.tableReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTableReferencesIsMutable(); + tableReferences_.addAll(other.tableReferences_); + } + onChanged(); + } + } else { + if (!other.tableReferences_.isEmpty()) { + if (tableReferencesBuilder_.isEmpty()) { + tableReferencesBuilder_.dispose(); + tableReferencesBuilder_ = null; + tableReferences_ = other.tableReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + tableReferencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTableReferencesFieldBuilder() + : null; + } else { + tableReferencesBuilder_.addAllMessages(other.tableReferences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.parser(), + extensionRegistry); + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + tableReferences_.add(m); + } else { + tableReferencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + tableReferences_ = java.util.Collections.emptyList(); + + private void ensureTableReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tableReferences_ = + new java.util.ArrayList( + tableReferences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + tableReferencesBuilder_; + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTableReferencesList() { + if (tableReferencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tableReferences_); + } else { + return tableReferencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getTableReferencesCount() { + if (tableReferencesBuilder_ == null) { + return tableReferences_.size(); + } else { + return tableReferencesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getTableReferences( + int index) { + if (tableReferencesBuilder_ == null) { + return tableReferences_.get(index); + } else { + return tableReferencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTableReferences( + int index, com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (tableReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableReferencesIsMutable(); + tableReferences_.set(index, value); + onChanged(); + } else { + tableReferencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTableReferences( + int index, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder builderForValue) { + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + tableReferences_.set(index, builderForValue.build()); + onChanged(); + } else { + tableReferencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTableReferences( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (tableReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableReferencesIsMutable(); + tableReferences_.add(value); + onChanged(); + } else { + tableReferencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTableReferences( + int index, com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (tableReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableReferencesIsMutable(); + tableReferences_.add(index, value); + onChanged(); + } else { + tableReferencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTableReferences( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder builderForValue) { + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + tableReferences_.add(builderForValue.build()); + onChanged(); + } else { + tableReferencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTableReferences( + int index, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder builderForValue) { + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + tableReferences_.add(index, builderForValue.build()); + onChanged(); + } else { + tableReferencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllTableReferences( + java.lang.Iterable + values) { + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tableReferences_); + onChanged(); + } else { + tableReferencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTableReferences() { + if (tableReferencesBuilder_ == null) { + tableReferences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tableReferencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTableReferences(int index) { + if (tableReferencesBuilder_ == null) { + ensureTableReferencesIsMutable(); + tableReferences_.remove(index); + onChanged(); + } else { + tableReferencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder + getTableReferencesBuilder(int index) { + return internalGetTableReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getTableReferencesOrBuilder(int index) { + if (tableReferencesBuilder_ == null) { + return tableReferences_.get(index); + } else { + return tableReferencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + getTableReferencesOrBuilderList() { + if (tableReferencesBuilder_ != null) { + return tableReferencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tableReferences_); + } + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder + addTableReferencesBuilder() { + return internalGetTableReferencesFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder + addTableReferencesBuilder(int index) { + return internalGetTableReferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. References to BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTableReferencesBuilderList() { + return internalGetTableReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + internalGetTableReferencesFieldBuilder() { + if (tableReferencesBuilder_ == null) { + tableReferencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder>( + tableReferences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + tableReferences_ = null; + } + return tableReferencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.BigQueryTableReferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.BigQueryTableReferences) + private static final com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences(); + } + + public static com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryTableReferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.BigQueryTableReferences + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferencesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferencesOrBuilder.java new file mode 100644 index 000000000000..a7349af93061 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BigQueryTableReferencesOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BigQueryTableReferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.BigQueryTableReferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getTableReferencesList(); + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getTableReferences(int index); + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTableReferencesCount(); + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getTableReferencesOrBuilderList(); + + /** + * + * + *
+   * Optional. References to BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryTableReference table_references = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getTableReferencesOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Blob.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Blob.java new file mode 100644 index 000000000000..aebf0a177824 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Blob.java @@ -0,0 +1,695 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A blob of data with a MIME type.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Blob} + */ +@com.google.protobuf.Generated +public final class Blob extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Blob) + BlobOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Blob"); + } + + // Use Blob.newBuilder() to construct. + private Blob(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Blob() { + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Blob.class, + com.google.cloud.geminidataanalytics.v1.Blob.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
+   * Required. The IANA standard MIME type of the message data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The IANA standard MIME type of the message data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * Required. The data represented as bytes.
+   * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Blob)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Blob other = + (com.google.cloud.geminidataanalytics.v1.Blob) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getData().equals(other.getData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob 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.geminidataanalytics.v1.Blob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob 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.geminidataanalytics.v1.Blob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Blob 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A blob of data with a MIME type.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Blob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Blob) + com.google.cloud.geminidataanalytics.v1.BlobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Blob.class, + com.google.cloud.geminidataanalytics.v1.Blob.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Blob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Blob_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Blob getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Blob build() { + com.google.cloud.geminidataanalytics.v1.Blob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Blob buildPartial() { + com.google.cloud.geminidataanalytics.v1.Blob result = + new com.google.cloud.geminidataanalytics.v1.Blob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Blob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Blob) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Blob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Blob other) { + if (other == com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance()) return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getData().isEmpty()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
+     * Required. The IANA standard MIME type of the message data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the message data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the message data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the message data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the message data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Required. The data represented as bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + * + * + *
+     * Required. The data represented as bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data represented as bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Blob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Blob) + private static final com.google.cloud.geminidataanalytics.v1.Blob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Blob(); + } + + public static com.google.cloud.geminidataanalytics.v1.Blob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Blob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Blob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BlobOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BlobOrBuilder.java new file mode 100644 index 000000000000..e97b1f8dbfb3 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/BlobOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface BlobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Blob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IANA standard MIME type of the message data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
+   * Required. The IANA standard MIME type of the message data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Required. The data represented as bytes.
+   * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessage.java new file mode 100644 index 000000000000..114c8703f17e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessage.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message produced during chart generation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartMessage} + */ +@com.google.protobuf.Generated +public final class ChartMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ChartMessage) + ChartMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChartMessage"); + } + + // Use ChartMessage.newBuilder() to construct. + private ChartMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChartMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartMessage.class, + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QUERY(1), + RESULT(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 QUERY; + case 2: + return RESULT; + 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 QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQuery getQuery() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder getQueryOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + + public static final int RESULT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResult getResult() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder getResultOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartResult.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.geminidataanalytics.v1.ChartQuery) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_); + } + getUnknownFields().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.geminidataanalytics.v1.ChartQuery) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ChartMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ChartMessage other = + (com.google.cloud.geminidataanalytics.v1.ChartMessage) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 2: + if (!getResult().equals(other.getResult())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage 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.geminidataanalytics.v1.ChartMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage 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.geminidataanalytics.v1.ChartMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ChartMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ChartMessage) + com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartMessage.class, + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ChartMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + if (resultBuilder_ != null) { + resultBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessage build() { + com.google.cloud.geminidataanalytics.v1.ChartMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.ChartMessage result = + new com.google.cloud.geminidataanalytics.v1.ChartMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ChartMessage result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.ChartMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && queryBuilder_ != null) { + result.kind_ = queryBuilder_.build(); + } + if (kindCase_ == 2 && resultBuilder_ != null) { + result.kind_ = resultBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ChartMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ChartMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ChartMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case RESULT: + { + mergeResult(other.getResult()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetResultFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartQuery, + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder> + queryBuilder_; + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQuery getQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return queryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + public Builder setQuery(com.google.cloud.geminidataanalytics.v1.ChartQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + public Builder setQuery( + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + public Builder mergeQuery(com.google.cloud.geminidataanalytics.v1.ChartQuery value) { + if (queryBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.ChartQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + queryBuilder_.mergeFrom(value); + } else { + queryBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + queryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder getQueryBuilder() { + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder getQueryOrBuilder() { + if ((kindCase_ == 1) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A query for generating a chart.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartQuery, + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartQuery, + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ChartQuery) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return queryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartResult, + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder, + com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder> + resultBuilder_; + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResult getResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return resultBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + public Builder setResult(com.google.cloud.geminidataanalytics.v1.ChartResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + public Builder setResult( + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder builderForValue) { + if (resultBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + public Builder mergeResult(com.google.cloud.geminidataanalytics.v1.ChartResult value) { + if (resultBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.ChartResult.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + resultBuilder_.mergeFrom(value); + } else { + resultBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + resultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + public com.google.cloud.geminidataanalytics.v1.ChartResult.Builder getResultBuilder() { + return internalGetResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder getResultOrBuilder() { + if ((kindCase_ == 2) && (resultBuilder_ != null)) { + return resultBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The result of a chart generation query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartResult, + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder, + com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder> + internalGetResultFieldBuilder() { + if (resultBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartResult, + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder, + com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ChartResult) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return resultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ChartMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ChartMessage) + private static final com.google.cloud.geminidataanalytics.v1.ChartMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ChartMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChartMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ChartMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessageOrBuilder.java new file mode 100644 index 000000000000..ac9274b5fb1b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartMessageOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ChartMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ChartMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + * + * @return The query. + */ + com.google.cloud.geminidataanalytics.v1.ChartQuery getQuery(); + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartQuery query = 1; + */ + com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + * + * @return The result. + */ + com.google.cloud.geminidataanalytics.v1.ChartResult getResult(); + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartResult result = 2; + */ + com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder getResultOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.ChartMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQuery.java new file mode 100644 index 000000000000..041aff7e8ee3 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQuery.java @@ -0,0 +1,792 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query for generating a chart.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartQuery} + */ +@com.google.protobuf.Generated +public final class ChartQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ChartQuery) + ChartQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChartQuery"); + } + + // Use ChartQuery.newBuilder() to construct. + private ChartQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChartQuery() { + instructions_ = ""; + dataResultName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartQuery.class, + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder.class); + } + + public static final int INSTRUCTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instructions_ = ""; + + /** + * + * + *
+   * Optional. Natural language instructions for generating the chart.
+   * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instructions. + */ + @java.lang.Override + public java.lang.String getInstructions() { + java.lang.Object ref = instructions_; + 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(); + instructions_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Natural language instructions for generating the chart.
+   * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstructionsBytes() { + java.lang.Object ref = instructions_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_RESULT_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataResultName_ = ""; + + /** + * + * + *
+   * Optional. The name of a previously retrieved data result to use in the
+   * chart.
+   * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataResultName. + */ + @java.lang.Override + public java.lang.String getDataResultName() { + java.lang.Object ref = dataResultName_; + 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(); + dataResultName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of a previously retrieved data result to use in the
+   * chart.
+   * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataResultName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataResultNameBytes() { + java.lang.Object ref = dataResultName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataResultName_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(instructions_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instructions_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataResultName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataResultName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instructions_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instructions_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataResultName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataResultName_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ChartQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ChartQuery other = + (com.google.cloud.geminidataanalytics.v1.ChartQuery) obj; + + if (!getInstructions().equals(other.getInstructions())) return false; + if (!getDataResultName().equals(other.getDataResultName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getInstructions().hashCode(); + hash = (37 * hash) + DATA_RESULT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDataResultName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery 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.geminidataanalytics.v1.ChartQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery 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.geminidataanalytics.v1.ChartQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ChartQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query for generating a chart.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ChartQuery) + com.google.cloud.geminidataanalytics.v1.ChartQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartQuery.class, + com.google.cloud.geminidataanalytics.v1.ChartQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ChartQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instructions_ = ""; + dataResultName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQuery build() { + com.google.cloud.geminidataanalytics.v1.ChartQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.ChartQuery result = + new com.google.cloud.geminidataanalytics.v1.ChartQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ChartQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instructions_ = instructions_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataResultName_ = dataResultName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ChartQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ChartQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ChartQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.ChartQuery.getDefaultInstance()) + return this; + if (!other.getInstructions().isEmpty()) { + instructions_ = other.instructions_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataResultName().isEmpty()) { + dataResultName_ = other.dataResultName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + instructions_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataResultName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object instructions_ = ""; + + /** + * + * + *
+     * Optional. Natural language instructions for generating the chart.
+     * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instructions. + */ + public java.lang.String getInstructions() { + java.lang.Object ref = instructions_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructions_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Natural language instructions for generating the chart.
+     * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instructions. + */ + public com.google.protobuf.ByteString getInstructionsBytes() { + java.lang.Object ref = instructions_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Natural language instructions for generating the chart.
+     * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The instructions to set. + * @return This builder for chaining. + */ + public Builder setInstructions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instructions_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language instructions for generating the chart.
+     * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInstructions() { + instructions_ = getDefaultInstance().getInstructions(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language instructions for generating the chart.
+     * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for instructions to set. + * @return This builder for chaining. + */ + public Builder setInstructionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instructions_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataResultName_ = ""; + + /** + * + * + *
+     * Optional. The name of a previously retrieved data result to use in the
+     * chart.
+     * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataResultName. + */ + public java.lang.String getDataResultName() { + java.lang.Object ref = dataResultName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataResultName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of a previously retrieved data result to use in the
+     * chart.
+     * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataResultName. + */ + public com.google.protobuf.ByteString getDataResultNameBytes() { + java.lang.Object ref = dataResultName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataResultName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of a previously retrieved data result to use in the
+     * chart.
+     * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataResultName to set. + * @return This builder for chaining. + */ + public Builder setDataResultName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataResultName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of a previously retrieved data result to use in the
+     * chart.
+     * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataResultName() { + dataResultName_ = getDefaultInstance().getDataResultName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of a previously retrieved data result to use in the
+     * chart.
+     * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataResultName to set. + * @return This builder for chaining. + */ + public Builder setDataResultNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataResultName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ChartQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ChartQuery) + private static final com.google.cloud.geminidataanalytics.v1.ChartQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ChartQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChartQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ChartQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQueryOrBuilder.java new file mode 100644 index 000000000000..8edd2c3fde2b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartQueryOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ChartQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ChartQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Natural language instructions for generating the chart.
+   * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instructions. + */ + java.lang.String getInstructions(); + + /** + * + * + *
+   * Optional. Natural language instructions for generating the chart.
+   * 
+ * + * string instructions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instructions. + */ + com.google.protobuf.ByteString getInstructionsBytes(); + + /** + * + * + *
+   * Optional. The name of a previously retrieved data result to use in the
+   * chart.
+   * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataResultName. + */ + java.lang.String getDataResultName(); + + /** + * + * + *
+   * Optional. The name of a previously retrieved data result to use in the
+   * chart.
+   * 
+ * + * string data_result_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataResultName. + */ + com.google.protobuf.ByteString getDataResultNameBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResult.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResult.java new file mode 100644 index 000000000000..2f894a34d2f2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResult.java @@ -0,0 +1,1015 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The result of a chart generation query.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartResult} + */ +@com.google.protobuf.Generated +public final class ChartResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ChartResult) + ChartResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChartResult"); + } + + // Use ChartResult.newBuilder() to construct. + private ChartResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChartResult() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartResult.class, + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder.class); + } + + private int bitField0_; + public static final int VEGA_CONFIG_FIELD_NUMBER = 2; + private com.google.protobuf.Struct vegaConfig_; + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the vegaConfig field is set. + */ + @java.lang.Override + public boolean hasVegaConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vegaConfig. + */ + @java.lang.Override + public com.google.protobuf.Struct getVegaConfig() { + return vegaConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : vegaConfig_; + } + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getVegaConfigOrBuilder() { + return vegaConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : vegaConfig_; + } + + public static final int IMAGE_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.Blob image_; + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The image. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Blob getImage() { + return image_ == null + ? com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance() + : image_; + } + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BlobOrBuilder getImageOrBuilder() { + return image_ == null + ? com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance() + : image_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getVegaConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getImage()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVegaConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImage()); + } + size += getUnknownFields().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.geminidataanalytics.v1.ChartResult)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ChartResult other = + (com.google.cloud.geminidataanalytics.v1.ChartResult) obj; + + if (hasVegaConfig() != other.hasVegaConfig()) return false; + if (hasVegaConfig()) { + if (!getVegaConfig().equals(other.getVegaConfig())) return false; + } + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage().equals(other.getImage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVegaConfig()) { + hash = (37 * hash) + VEGA_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVegaConfig().hashCode(); + } + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult 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.geminidataanalytics.v1.ChartResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult 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.geminidataanalytics.v1.ChartResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ChartResult 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The result of a chart generation query.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChartResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ChartResult) + com.google.cloud.geminidataanalytics.v1.ChartResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChartResult.class, + com.google.cloud.geminidataanalytics.v1.ChartResult.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ChartResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetVegaConfigFieldBuilder(); + internalGetImageFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + vegaConfig_ = null; + if (vegaConfigBuilder_ != null) { + vegaConfigBuilder_.dispose(); + vegaConfigBuilder_ = null; + } + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChartResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResult getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResult build() { + com.google.cloud.geminidataanalytics.v1.ChartResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartResult buildPartial() { + com.google.cloud.geminidataanalytics.v1.ChartResult result = + new com.google.cloud.geminidataanalytics.v1.ChartResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ChartResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.vegaConfig_ = vegaConfigBuilder_ == null ? vegaConfig_ : vegaConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ChartResult) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ChartResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ChartResult other) { + if (other == com.google.cloud.geminidataanalytics.v1.ChartResult.getDefaultInstance()) + return this; + if (other.hasVegaConfig()) { + mergeVegaConfig(other.getVegaConfig()); + } + if (other.hasImage()) { + mergeImage(other.getImage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetVegaConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetImageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct vegaConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + vegaConfigBuilder_; + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vegaConfig field is set. + */ + public boolean hasVegaConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vegaConfig. + */ + public com.google.protobuf.Struct getVegaConfig() { + if (vegaConfigBuilder_ == null) { + return vegaConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : vegaConfig_; + } else { + return vegaConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVegaConfig(com.google.protobuf.Struct value) { + if (vegaConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vegaConfig_ = value; + } else { + vegaConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVegaConfig(com.google.protobuf.Struct.Builder builderForValue) { + if (vegaConfigBuilder_ == null) { + vegaConfig_ = builderForValue.build(); + } else { + vegaConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVegaConfig(com.google.protobuf.Struct value) { + if (vegaConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && vegaConfig_ != null + && vegaConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { + getVegaConfigBuilder().mergeFrom(value); + } else { + vegaConfig_ = value; + } + } else { + vegaConfigBuilder_.mergeFrom(value); + } + if (vegaConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVegaConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + vegaConfig_ = null; + if (vegaConfigBuilder_ != null) { + vegaConfigBuilder_.dispose(); + vegaConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getVegaConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetVegaConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getVegaConfigOrBuilder() { + if (vegaConfigBuilder_ != null) { + return vegaConfigBuilder_.getMessageOrBuilder(); + } else { + return vegaConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : vegaConfig_; + } + } + + /** + * + * + *
+     * Optional. A generated Vega chart config.
+     * See https://vega.github.io/vega/docs/config/
+     * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetVegaConfigFieldBuilder() { + if (vegaConfigBuilder_ == null) { + vegaConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getVegaConfig(), getParentForChildren(), isClean()); + vegaConfig_ = null; + } + return vegaConfigBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Blob image_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Blob, + com.google.cloud.geminidataanalytics.v1.Blob.Builder, + com.google.cloud.geminidataanalytics.v1.BlobOrBuilder> + imageBuilder_; + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The image. + */ + public com.google.cloud.geminidataanalytics.v1.Blob getImage() { + if (imageBuilder_ == null) { + return image_ == null + ? com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance() + : image_; + } else { + return imageBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImage(com.google.cloud.geminidataanalytics.v1.Blob value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImage(com.google.cloud.geminidataanalytics.v1.Blob.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeImage(com.google.cloud.geminidataanalytics.v1.Blob value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && image_ != null + && image_ != com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + if (image_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000002); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Blob.Builder getImageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetImageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.BlobOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null + ? com.google.cloud.geminidataanalytics.v1.Blob.getDefaultInstance() + : image_; + } + } + + /** + * + * + *
+     * Optional. A rendering of the chart if this was requested in the context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Blob, + com.google.cloud.geminidataanalytics.v1.Blob.Builder, + com.google.cloud.geminidataanalytics.v1.BlobOrBuilder> + internalGetImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Blob, + com.google.cloud.geminidataanalytics.v1.Blob.Builder, + com.google.cloud.geminidataanalytics.v1.BlobOrBuilder>( + getImage(), getParentForChildren(), isClean()); + image_ = null; + } + return imageBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ChartResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ChartResult) + private static final com.google.cloud.geminidataanalytics.v1.ChartResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ChartResult(); + } + + public static com.google.cloud.geminidataanalytics.v1.ChartResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChartResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ChartResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResultOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResultOrBuilder.java new file mode 100644 index 000000000000..441d368136d7 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChartResultOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ChartResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ChartResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the vegaConfig field is set. + */ + boolean hasVegaConfig(); + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vegaConfig. + */ + com.google.protobuf.Struct getVegaConfig(); + + /** + * + * + *
+   * Optional. A generated Vega chart config.
+   * See https://vega.github.io/vega/docs/config/
+   * 
+ * + * .google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getVegaConfigOrBuilder(); + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the image field is set. + */ + boolean hasImage(); + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The image. + */ + com.google.cloud.geminidataanalytics.v1.Blob getImage(); + + /** + * + * + *
+   * Optional. A rendering of the chart if this was requested in the context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.BlobOrBuilder getImageOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequest.java new file mode 100644 index 000000000000..576616524198 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequest.java @@ -0,0 +1,4229 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for Chat.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChatRequest} + */ +@com.google.protobuf.Generated +public final class ChatRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ChatRequest) + ChatRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChatRequest"); + } + + // Use ChatRequest.newBuilder() to construct. + private ChatRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChatRequest() { + parent_ = ""; + messages_ = java.util.Collections.emptyList(); + thinkingMode_ = 0; + model_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChatRequest.class, + com.google.cloud.geminidataanalytics.v1.ChatRequest.Builder.class); + } + + /** + * + * + *
+   * Mode of thinking for the agent.
+   * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode} + */ + public enum ThinkingMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified thinking mode, agent will use THINKING mode by default.
+     * 
+ * + * THINKING_MODE_UNSPECIFIED = 0; + */ + THINKING_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Fast mode, answers quickly.
+     * 
+ * + * FAST = 1; + */ + FAST(1), + /** + * + * + *
+     * Thinking mode, solves complex problems.
+     * 
+ * + * THINKING = 2; + */ + THINKING(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ThinkingMode"); + } + + /** + * + * + *
+     * Unspecified thinking mode, agent will use THINKING mode by default.
+     * 
+ * + * THINKING_MODE_UNSPECIFIED = 0; + */ + public static final int THINKING_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Fast mode, answers quickly.
+     * 
+ * + * FAST = 1; + */ + public static final int FAST_VALUE = 1; + + /** + * + * + *
+     * Thinking mode, solves complex problems.
+     * 
+ * + * THINKING = 2; + */ + public static final int THINKING_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 ThinkingMode 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 ThinkingMode forNumber(int value) { + switch (value) { + case 0: + return THINKING_MODE_UNSPECIFIED; + case 1: + return FAST; + case 2: + return THINKING; + 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 ThinkingMode findValueByNumber(int number) { + return ThinkingMode.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ChatRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ThinkingMode[] VALUES = values(); + + public static ThinkingMode 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 ThinkingMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode) + } + + /** + * + * + *
+   * Model selection for the agent.
+   * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.ChatRequest.Model} + */ + public enum Model implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No model specified. The default model will be used. Currently, this is
+     * `gemini-3.0-flash-preview`.
+     * 
+ * + * MODEL_UNSPECIFIED = 0; + */ + MODEL_UNSPECIFIED(0), + /** + * + * + *
+     * Use the most up-to-date non-preview model. Currently, this is
+     * `gemini-2.5-flash`. This constrains the request level settings. The
+     * default will change to `gemini-2.5-flash`, and setting `thinking_mode`
+     * will not be supported.
+     * 
+ * + * LATEST_GA_MODEL = 1; + */ + LATEST_GA_MODEL(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Model"); + } + + /** + * + * + *
+     * No model specified. The default model will be used. Currently, this is
+     * `gemini-3.0-flash-preview`.
+     * 
+ * + * MODEL_UNSPECIFIED = 0; + */ + public static final int MODEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Use the most up-to-date non-preview model. Currently, this is
+     * `gemini-2.5-flash`. This constrains the request level settings. The
+     * default will change to `gemini-2.5-flash`, and setting `thinking_mode`
+     * will not be supported.
+     * 
+ * + * LATEST_GA_MODEL = 1; + */ + public static final int LATEST_GA_MODEL_VALUE = 1; + + 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 Model 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 Model forNumber(int value) { + switch (value) { + case 0: + return MODEL_UNSPECIFIED; + case 1: + return LATEST_GA_MODEL; + 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 Model findValueByNumber(int number) { + return Model.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ChatRequest.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Model[] VALUES = values(); + + public static Model 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 Model(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.ChatRequest.Model) + } + + private int bitField0_; + private int contextProviderCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object contextProvider_; + + public enum ContextProviderCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_CONTEXT(101), + CONVERSATION_REFERENCE(103), + DATA_AGENT_CONTEXT(104), + CLIENT_MANAGED_RESOURCE_CONTEXT(105), + CONTEXTPROVIDER_NOT_SET(0); + private final int value; + + private ContextProviderCase(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 ContextProviderCase valueOf(int value) { + return forNumber(value); + } + + public static ContextProviderCase forNumber(int value) { + switch (value) { + case 101: + return INLINE_CONTEXT; + case 103: + return CONVERSATION_REFERENCE; + case 104: + return DATA_AGENT_CONTEXT; + case 105: + return CLIENT_MANAGED_RESOURCE_CONTEXT; + case 0: + return CONTEXTPROVIDER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ContextProviderCase getContextProviderCase() { + return ContextProviderCase.forNumber(contextProviderCase_); + } + + private int datasourceSettingsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object datasourceSettings_; + + public enum DatasourceSettingsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOOKER_SETTINGS(13), + DATASOURCESETTINGS_NOT_SET(0); + private final int value; + + private DatasourceSettingsCase(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 DatasourceSettingsCase valueOf(int value) { + return forNumber(value); + } + + public static DatasourceSettingsCase forNumber(int value) { + switch (value) { + case 13: + return LOOKER_SETTINGS; + case 0: + return DATASOURCESETTINGS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DatasourceSettingsCase getDatasourceSettingsCase() { + return DatasourceSettingsCase.forNumber(datasourceSettingsCase_); + } + + public static final int INLINE_CONTEXT_FIELD_NUMBER = 101; + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inlineContext field is set. + */ + @java.lang.Override + public boolean hasInlineContext() { + return contextProviderCase_ == 101; + } + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inlineContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getInlineContext() { + if (contextProviderCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder() { + if (contextProviderCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + + public static final int CONVERSATION_REFERENCE_FIELD_NUMBER = 103; + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conversationReference field is set. + */ + @java.lang.Override + public boolean hasConversationReference() { + return contextProviderCase_ == 103; + } + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conversationReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReference getConversationReference() { + if (contextProviderCase_ == 103) { + return (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder + getConversationReferenceOrBuilder() { + if (contextProviderCase_ == 103) { + return (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + + public static final int DATA_AGENT_CONTEXT_FIELD_NUMBER = 104; + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAgentContext field is set. + */ + @java.lang.Override + public boolean hasDataAgentContext() { + return contextProviderCase_ == 104; + } + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAgentContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext() { + if (contextProviderCase_ == 104) { + return (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder + getDataAgentContextOrBuilder() { + if (contextProviderCase_ == 104) { + return (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + + public static final int CLIENT_MANAGED_RESOURCE_CONTEXT_FIELD_NUMBER = 105; + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientManagedResourceContext field is set. + */ + @java.lang.Override + public boolean hasClientManagedResourceContext() { + return contextProviderCase_ == 105; + } + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientManagedResourceContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + getClientManagedResourceContext() { + if (contextProviderCase_ == 105) { + return (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder + getClientManagedResourceContextOrBuilder() { + if (contextProviderCase_ == 105) { + return (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + + public static final int LOOKER_SETTINGS_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerSettings field is set. + */ + @java.lang.Override + public boolean hasLookerSettings() { + return datasourceSettingsCase_ == 13; + } + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerSettings. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettings getLookerSettings() { + if (datasourceSettingsCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_; + } + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder + getLookerSettingsOrBuilder() { + if (datasourceSettingsCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_; + } + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent value for chat request.
+   * Pattern: `projects/{project}/locations/{location}`
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parent value for chat request.
+   * Pattern: `projects/{project}/locations/{location}`
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 MESSAGES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List messages_; + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getMessagesList() { + return messages_; + } + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMessagesOrBuilderList() { + return messages_; + } + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMessagesCount() { + return messages_.size(); + } + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Message getMessages(int index) { + return messages_.get(index); + } + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessagesOrBuilder(int index) { + return messages_.get(index); + } + + public static final int CREDENTIALS_FIELD_NUMBER = 7; + private com.google.cloud.geminidataanalytics.v1.Credentials credentials_; + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the credentials field is set. + */ + @java.lang.Override + public boolean hasCredentials() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The credentials. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Credentials getCredentials() { + return credentials_ == null + ? com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance() + : credentials_; + } + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder getCredentialsOrBuilder() { + return credentials_ == null + ? com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance() + : credentials_; + } + + public static final int THINKING_MODE_FIELD_NUMBER = 9; + private int thinkingMode_ = 0; + + /** + * + * + *
+   * Optional. The thinking mode to use for the agent loop.
+   * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for thinkingMode. + */ + @java.lang.Override + public int getThinkingModeValue() { + return thinkingMode_; + } + + /** + * + * + *
+   * Optional. The thinking mode to use for the agent loop.
+   * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The thinkingMode. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode getThinkingMode() { + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode result = + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode.forNumber(thinkingMode_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode.UNRECOGNIZED + : result; + } + + public static final int MODEL_FIELD_NUMBER = 11; + private int model_ = 0; + + /** + * + * + *
+   * Optional. The model to use for the agent loop when processing the request.
+   * This setting only has an effect when context.options.model is not set.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + @java.lang.Override + public int getModelValue() { + return model_; + } + + /** + * + * + *
+   * Optional. The model to use for the agent loop when processing the request.
+   * This setting only has an effect when context.options.model is not set.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest.Model getModel() { + com.google.cloud.geminidataanalytics.v1.ChatRequest.Model result = + com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.forNumber(model_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.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 { + for (int i = 0; i < messages_.size(); i++) { + output.writeMessage(2, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCredentials()); + } + if (thinkingMode_ + != com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode + .THINKING_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, thinkingMode_); + } + if (model_ + != com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.MODEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, model_); + } + if (datasourceSettingsCase_ == 13) { + output.writeMessage( + 13, (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_); + } + if (contextProviderCase_ == 101) { + output.writeMessage(101, (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_); + } + if (contextProviderCase_ == 103) { + output.writeMessage( + 103, (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_); + } + if (contextProviderCase_ == 104) { + output.writeMessage( + 104, (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_); + } + if (contextProviderCase_ == 105) { + output.writeMessage( + 105, + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) contextProvider_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCredentials()); + } + if (thinkingMode_ + != com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode + .THINKING_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, thinkingMode_); + } + if (model_ + != com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.MODEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, model_); + } + if (datasourceSettingsCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_); + } + if (contextProviderCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_); + } + if (contextProviderCase_ == 103) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 103, + (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_); + } + if (contextProviderCase_ == 104) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 104, (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_); + } + if (contextProviderCase_ == 105) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 105, + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ChatRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ChatRequest other = + (com.google.cloud.geminidataanalytics.v1.ChatRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getMessagesList().equals(other.getMessagesList())) return false; + if (hasCredentials() != other.hasCredentials()) return false; + if (hasCredentials()) { + if (!getCredentials().equals(other.getCredentials())) return false; + } + if (thinkingMode_ != other.thinkingMode_) return false; + if (model_ != other.model_) return false; + if (!getContextProviderCase().equals(other.getContextProviderCase())) return false; + switch (contextProviderCase_) { + case 101: + if (!getInlineContext().equals(other.getInlineContext())) return false; + break; + case 103: + if (!getConversationReference().equals(other.getConversationReference())) return false; + break; + case 104: + if (!getDataAgentContext().equals(other.getDataAgentContext())) return false; + break; + case 105: + if (!getClientManagedResourceContext().equals(other.getClientManagedResourceContext())) + return false; + break; + case 0: + default: + } + if (!getDatasourceSettingsCase().equals(other.getDatasourceSettingsCase())) return false; + switch (datasourceSettingsCase_) { + case 13: + if (!getLookerSettings().equals(other.getLookerSettings())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getMessagesCount() > 0) { + hash = (37 * hash) + MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getMessagesList().hashCode(); + } + if (hasCredentials()) { + hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getCredentials().hashCode(); + } + hash = (37 * hash) + THINKING_MODE_FIELD_NUMBER; + hash = (53 * hash) + thinkingMode_; + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + model_; + switch (contextProviderCase_) { + case 101: + hash = (37 * hash) + INLINE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getInlineContext().hashCode(); + break; + case 103: + hash = (37 * hash) + CONVERSATION_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getConversationReference().hashCode(); + break; + case 104: + hash = (37 * hash) + DATA_AGENT_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getDataAgentContext().hashCode(); + break; + case 105: + hash = (37 * hash) + CLIENT_MANAGED_RESOURCE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getClientManagedResourceContext().hashCode(); + break; + case 0: + default: + } + switch (datasourceSettingsCase_) { + case 13: + hash = (37 * hash) + LOOKER_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLookerSettings().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest 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.geminidataanalytics.v1.ChatRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest 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.geminidataanalytics.v1.ChatRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ChatRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for Chat.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ChatRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ChatRequest) + com.google.cloud.geminidataanalytics.v1.ChatRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ChatRequest.class, + com.google.cloud.geminidataanalytics.v1.ChatRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ChatRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMessagesFieldBuilder(); + internalGetCredentialsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineContextBuilder_ != null) { + inlineContextBuilder_.clear(); + } + if (conversationReferenceBuilder_ != null) { + conversationReferenceBuilder_.clear(); + } + if (dataAgentContextBuilder_ != null) { + dataAgentContextBuilder_.clear(); + } + if (clientManagedResourceContextBuilder_ != null) { + clientManagedResourceContextBuilder_.clear(); + } + if (lookerSettingsBuilder_ != null) { + lookerSettingsBuilder_.clear(); + } + parent_ = ""; + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + } else { + messages_ = null; + messagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + credentials_ = null; + if (credentialsBuilder_ != null) { + credentialsBuilder_.dispose(); + credentialsBuilder_ = null; + } + thinkingMode_ = 0; + model_ = 0; + contextProviderCase_ = 0; + contextProvider_ = null; + datasourceSettingsCase_ = 0; + datasourceSettings_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ChatRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest build() { + com.google.cloud.geminidataanalytics.v1.ChatRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.ChatRequest result = + new com.google.cloud.geminidataanalytics.v1.ChatRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ChatRequest result) { + if (messagesBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + messages_ = java.util.Collections.unmodifiableList(messages_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.messages_ = messages_; + } else { + result.messages_ = messagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ChatRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.credentials_ = + credentialsBuilder_ == null ? credentials_ : credentialsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.thinkingMode_ = thinkingMode_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.model_ = model_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.ChatRequest result) { + result.contextProviderCase_ = contextProviderCase_; + result.contextProvider_ = this.contextProvider_; + if (contextProviderCase_ == 101 && inlineContextBuilder_ != null) { + result.contextProvider_ = inlineContextBuilder_.build(); + } + if (contextProviderCase_ == 103 && conversationReferenceBuilder_ != null) { + result.contextProvider_ = conversationReferenceBuilder_.build(); + } + if (contextProviderCase_ == 104 && dataAgentContextBuilder_ != null) { + result.contextProvider_ = dataAgentContextBuilder_.build(); + } + if (contextProviderCase_ == 105 && clientManagedResourceContextBuilder_ != null) { + result.contextProvider_ = clientManagedResourceContextBuilder_.build(); + } + result.datasourceSettingsCase_ = datasourceSettingsCase_; + result.datasourceSettings_ = this.datasourceSettings_; + if (datasourceSettingsCase_ == 13 && lookerSettingsBuilder_ != null) { + result.datasourceSettings_ = lookerSettingsBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ChatRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ChatRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ChatRequest other) { + if (other == com.google.cloud.geminidataanalytics.v1.ChatRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (messagesBuilder_ == null) { + if (!other.messages_.isEmpty()) { + if (messages_.isEmpty()) { + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureMessagesIsMutable(); + messages_.addAll(other.messages_); + } + onChanged(); + } + } else { + if (!other.messages_.isEmpty()) { + if (messagesBuilder_.isEmpty()) { + messagesBuilder_.dispose(); + messagesBuilder_ = null; + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000040); + messagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessagesFieldBuilder() + : null; + } else { + messagesBuilder_.addAllMessages(other.messages_); + } + } + } + if (other.hasCredentials()) { + mergeCredentials(other.getCredentials()); + } + if (other.thinkingMode_ != 0) { + setThinkingModeValue(other.getThinkingModeValue()); + } + if (other.model_ != 0) { + setModelValue(other.getModelValue()); + } + switch (other.getContextProviderCase()) { + case INLINE_CONTEXT: + { + mergeInlineContext(other.getInlineContext()); + break; + } + case CONVERSATION_REFERENCE: + { + mergeConversationReference(other.getConversationReference()); + break; + } + case DATA_AGENT_CONTEXT: + { + mergeDataAgentContext(other.getDataAgentContext()); + break; + } + case CLIENT_MANAGED_RESOURCE_CONTEXT: + { + mergeClientManagedResourceContext(other.getClientManagedResourceContext()); + break; + } + case CONTEXTPROVIDER_NOT_SET: + { + break; + } + } + switch (other.getDatasourceSettingsCase()) { + case LOOKER_SETTINGS: + { + mergeLookerSettings(other.getLookerSettings()); + break; + } + case DATASOURCESETTINGS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.geminidataanalytics.v1.Message m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Message.parser(), + extensionRegistry); + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(m); + } else { + messagesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26 + case 58: + { + input.readMessage( + internalGetCredentialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 72: + { + thinkingMode_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 88: + { + model_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 106: + { + input.readMessage( + internalGetLookerSettingsFieldBuilder().getBuilder(), extensionRegistry); + datasourceSettingsCase_ = 13; + break; + } // case 106 + case 810: + { + input.readMessage( + internalGetInlineContextFieldBuilder().getBuilder(), extensionRegistry); + contextProviderCase_ = 101; + break; + } // case 810 + case 826: + { + input.readMessage( + internalGetConversationReferenceFieldBuilder().getBuilder(), extensionRegistry); + contextProviderCase_ = 103; + break; + } // case 826 + case 834: + { + input.readMessage( + internalGetDataAgentContextFieldBuilder().getBuilder(), extensionRegistry); + contextProviderCase_ = 104; + break; + } // case 834 + case 842: + { + input.readMessage( + internalGetClientManagedResourceContextFieldBuilder().getBuilder(), + extensionRegistry); + contextProviderCase_ = 105; + break; + } // case 842 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int contextProviderCase_ = 0; + private java.lang.Object contextProvider_; + + public ContextProviderCase getContextProviderCase() { + return ContextProviderCase.forNumber(contextProviderCase_); + } + + public Builder clearContextProvider() { + contextProviderCase_ = 0; + contextProvider_ = null; + onChanged(); + return this; + } + + private int datasourceSettingsCase_ = 0; + private java.lang.Object datasourceSettings_; + + public DatasourceSettingsCase getDatasourceSettingsCase() { + return DatasourceSettingsCase.forNumber(datasourceSettingsCase_); + } + + public Builder clearDatasourceSettings() { + datasourceSettingsCase_ = 0; + datasourceSettings_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + inlineContextBuilder_; + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inlineContext field is set. + */ + @java.lang.Override + public boolean hasInlineContext() { + return contextProviderCase_ == 101; + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inlineContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getInlineContext() { + if (inlineContextBuilder_ == null) { + if (contextProviderCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } else { + if (contextProviderCase_ == 101) { + return inlineContextBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInlineContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (inlineContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextProvider_ = value; + onChanged(); + } else { + inlineContextBuilder_.setMessage(value); + } + contextProviderCase_ = 101; + return this; + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInlineContext( + com.google.cloud.geminidataanalytics.v1.Context.Builder builderForValue) { + if (inlineContextBuilder_ == null) { + contextProvider_ = builderForValue.build(); + onChanged(); + } else { + inlineContextBuilder_.setMessage(builderForValue.build()); + } + contextProviderCase_ = 101; + return this; + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInlineContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (inlineContextBuilder_ == null) { + if (contextProviderCase_ == 101 + && contextProvider_ + != com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.Context.newBuilder( + (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_) + .mergeFrom(value) + .buildPartial(); + } else { + contextProvider_ = value; + } + onChanged(); + } else { + if (contextProviderCase_ == 101) { + inlineContextBuilder_.mergeFrom(value); + } else { + inlineContextBuilder_.setMessage(value); + } + } + contextProviderCase_ = 101; + return this; + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInlineContext() { + if (inlineContextBuilder_ == null) { + if (contextProviderCase_ == 101) { + contextProviderCase_ = 0; + contextProvider_ = null; + onChanged(); + } + } else { + if (contextProviderCase_ == 101) { + contextProviderCase_ = 0; + contextProvider_ = null; + } + inlineContextBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.Builder getInlineContextBuilder() { + return internalGetInlineContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder() { + if ((contextProviderCase_ == 101) && (inlineContextBuilder_ != null)) { + return inlineContextBuilder_.getMessageOrBuilder(); + } else { + if (contextProviderCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Inline context for the chat request. Use this to chat
+     * statelessly (without managed conversation persistence and without an
+     * Agent) by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + internalGetInlineContextFieldBuilder() { + if (inlineContextBuilder_ == null) { + if (!(contextProviderCase_ == 101)) { + contextProvider_ = com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + inlineContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.Context) contextProvider_, + getParentForChildren(), + isClean()); + contextProvider_ = null; + } + contextProviderCase_ = 101; + onChanged(); + return inlineContextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationReference, + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder> + conversationReferenceBuilder_; + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conversationReference field is set. + */ + @java.lang.Override + public boolean hasConversationReference() { + return contextProviderCase_ == 103; + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conversationReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReference + getConversationReference() { + if (conversationReferenceBuilder_ == null) { + if (contextProviderCase_ == 103) { + return (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } else { + if (contextProviderCase_ == 103) { + return conversationReferenceBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConversationReference( + com.google.cloud.geminidataanalytics.v1.ConversationReference value) { + if (conversationReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextProvider_ = value; + onChanged(); + } else { + conversationReferenceBuilder_.setMessage(value); + } + contextProviderCase_ = 103; + return this; + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConversationReference( + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder builderForValue) { + if (conversationReferenceBuilder_ == null) { + contextProvider_ = builderForValue.build(); + onChanged(); + } else { + conversationReferenceBuilder_.setMessage(builderForValue.build()); + } + contextProviderCase_ = 103; + return this; + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConversationReference( + com.google.cloud.geminidataanalytics.v1.ConversationReference value) { + if (conversationReferenceBuilder_ == null) { + if (contextProviderCase_ == 103 + && contextProvider_ + != com.google.cloud.geminidataanalytics.v1.ConversationReference + .getDefaultInstance()) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.ConversationReference.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ConversationReference) + contextProvider_) + .mergeFrom(value) + .buildPartial(); + } else { + contextProvider_ = value; + } + onChanged(); + } else { + if (contextProviderCase_ == 103) { + conversationReferenceBuilder_.mergeFrom(value); + } else { + conversationReferenceBuilder_.setMessage(value); + } + } + contextProviderCase_ = 103; + return this; + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConversationReference() { + if (conversationReferenceBuilder_ == null) { + if (contextProviderCase_ == 103) { + contextProviderCase_ = 0; + contextProvider_ = null; + onChanged(); + } + } else { + if (contextProviderCase_ == 103) { + contextProviderCase_ = 0; + contextProvider_ = null; + } + conversationReferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder + getConversationReferenceBuilder() { + return internalGetConversationReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder + getConversationReferenceOrBuilder() { + if ((contextProviderCase_ == 103) && (conversationReferenceBuilder_ != null)) { + return conversationReferenceBuilder_.getMessageOrBuilder(); + } else { + if (contextProviderCase_ == 103) { + return (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Reference to a persisted conversation and agent context.
+     * Use this to chat with an Agent using managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationReference, + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder> + internalGetConversationReferenceFieldBuilder() { + if (conversationReferenceBuilder_ == null) { + if (!(contextProviderCase_ == 103)) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + conversationReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationReference, + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ConversationReference) contextProvider_, + getParentForChildren(), + isClean()); + contextProvider_ = null; + } + contextProviderCase_ = 103; + onChanged(); + return conversationReferenceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder> + dataAgentContextBuilder_; + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAgentContext field is set. + */ + @java.lang.Override + public boolean hasDataAgentContext() { + return contextProviderCase_ == 104; + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAgentContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext() { + if (dataAgentContextBuilder_ == null) { + if (contextProviderCase_ == 104) { + return (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } else { + if (contextProviderCase_ == 104) { + return dataAgentContextBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext value) { + if (dataAgentContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextProvider_ = value; + onChanged(); + } else { + dataAgentContextBuilder_.setMessage(value); + } + contextProviderCase_ = 104; + return this; + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder builderForValue) { + if (dataAgentContextBuilder_ == null) { + contextProvider_ = builderForValue.build(); + onChanged(); + } else { + dataAgentContextBuilder_.setMessage(builderForValue.build()); + } + contextProviderCase_ = 104; + return this; + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext value) { + if (dataAgentContextBuilder_ == null) { + if (contextProviderCase_ == 104 + && contextProvider_ + != com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance()) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.DataAgentContext.newBuilder( + (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_) + .mergeFrom(value) + .buildPartial(); + } else { + contextProvider_ = value; + } + onChanged(); + } else { + if (contextProviderCase_ == 104) { + dataAgentContextBuilder_.mergeFrom(value); + } else { + dataAgentContextBuilder_.setMessage(value); + } + } + contextProviderCase_ = 104; + return this; + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataAgentContext() { + if (dataAgentContextBuilder_ == null) { + if (contextProviderCase_ == 104) { + contextProviderCase_ = 0; + contextProvider_ = null; + onChanged(); + } + } else { + if (contextProviderCase_ == 104) { + contextProviderCase_ = 0; + contextProvider_ = null; + } + dataAgentContextBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder + getDataAgentContextBuilder() { + return internalGetDataAgentContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder + getDataAgentContextOrBuilder() { + if ((contextProviderCase_ == 104) && (dataAgentContextBuilder_ != null)) { + return dataAgentContextBuilder_.getMessageOrBuilder(); + } else { + if (contextProviderCase_ == 104) { + return (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Context for the chat request. Use this to chat with an Agent
+     * statelessly, without managed conversation persistence.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder> + internalGetDataAgentContextFieldBuilder() { + if (dataAgentContextBuilder_ == null) { + if (!(contextProviderCase_ == 104)) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + dataAgentContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.DataAgentContext) contextProvider_, + getParentForChildren(), + isClean()); + contextProvider_ = null; + } + contextProviderCase_ = 104; + onChanged(); + return dataAgentContextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder> + clientManagedResourceContextBuilder_; + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientManagedResourceContext field is set. + */ + @java.lang.Override + public boolean hasClientManagedResourceContext() { + return contextProviderCase_ == 105; + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientManagedResourceContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + getClientManagedResourceContext() { + if (clientManagedResourceContextBuilder_ == null) { + if (contextProviderCase_ == 105) { + return (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } else { + if (contextProviderCase_ == 105) { + return clientManagedResourceContextBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClientManagedResourceContext( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext value) { + if (clientManagedResourceContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextProvider_ = value; + onChanged(); + } else { + clientManagedResourceContextBuilder_.setMessage(value); + } + contextProviderCase_ = 105; + return this; + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClientManagedResourceContext( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder + builderForValue) { + if (clientManagedResourceContextBuilder_ == null) { + contextProvider_ = builderForValue.build(); + onChanged(); + } else { + clientManagedResourceContextBuilder_.setMessage(builderForValue.build()); + } + contextProviderCase_ = 105; + return this; + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeClientManagedResourceContext( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext value) { + if (clientManagedResourceContextBuilder_ == null) { + if (contextProviderCase_ == 105 + && contextProvider_ + != com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance()) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_) + .mergeFrom(value) + .buildPartial(); + } else { + contextProvider_ = value; + } + onChanged(); + } else { + if (contextProviderCase_ == 105) { + clientManagedResourceContextBuilder_.mergeFrom(value); + } else { + clientManagedResourceContextBuilder_.setMessage(value); + } + } + contextProviderCase_ = 105; + return this; + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearClientManagedResourceContext() { + if (clientManagedResourceContextBuilder_ == null) { + if (contextProviderCase_ == 105) { + contextProviderCase_ = 0; + contextProvider_ = null; + onChanged(); + } + } else { + if (contextProviderCase_ == 105) { + contextProviderCase_ = 0; + contextProvider_ = null; + } + clientManagedResourceContextBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder + getClientManagedResourceContextBuilder() { + return internalGetClientManagedResourceContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder + getClientManagedResourceContextOrBuilder() { + if ((contextProviderCase_ == 105) && (clientManagedResourceContextBuilder_ != null)) { + return clientManagedResourceContextBuilder_.getMessageOrBuilder(); + } else { + if (contextProviderCase_ == 105) { + return (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_; + } + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Context with client managed resources.
+     * Some clients may not use GDA managed resources including
+     * conversations and agents, instead they create and manage their own
+     * conversations and agents resources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder> + internalGetClientManagedResourceContextFieldBuilder() { + if (clientManagedResourceContextBuilder_ == null) { + if (!(contextProviderCase_ == 105)) { + contextProvider_ = + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + clientManagedResourceContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + contextProvider_, + getParentForChildren(), + isClean()); + contextProvider_ = null; + } + contextProviderCase_ = 105; + onChanged(); + return clientManagedResourceContextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerSettings, + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder, + com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder> + lookerSettingsBuilder_; + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerSettings field is set. + */ + @java.lang.Override + public boolean hasLookerSettings() { + return datasourceSettingsCase_ == 13; + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerSettings. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettings getLookerSettings() { + if (lookerSettingsBuilder_ == null) { + if (datasourceSettingsCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_; + } + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } else { + if (datasourceSettingsCase_ == 13) { + return lookerSettingsBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerSettings(com.google.cloud.geminidataanalytics.v1.LookerSettings value) { + if (lookerSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datasourceSettings_ = value; + onChanged(); + } else { + lookerSettingsBuilder_.setMessage(value); + } + datasourceSettingsCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerSettings( + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder builderForValue) { + if (lookerSettingsBuilder_ == null) { + datasourceSettings_ = builderForValue.build(); + onChanged(); + } else { + lookerSettingsBuilder_.setMessage(builderForValue.build()); + } + datasourceSettingsCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLookerSettings( + com.google.cloud.geminidataanalytics.v1.LookerSettings value) { + if (lookerSettingsBuilder_ == null) { + if (datasourceSettingsCase_ == 13 + && datasourceSettings_ + != com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance()) { + datasourceSettings_ = + com.google.cloud.geminidataanalytics.v1.LookerSettings.newBuilder( + (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + datasourceSettings_ = value; + } + onChanged(); + } else { + if (datasourceSettingsCase_ == 13) { + lookerSettingsBuilder_.mergeFrom(value); + } else { + lookerSettingsBuilder_.setMessage(value); + } + } + datasourceSettingsCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLookerSettings() { + if (lookerSettingsBuilder_ == null) { + if (datasourceSettingsCase_ == 13) { + datasourceSettingsCase_ = 0; + datasourceSettings_ = null; + onChanged(); + } + } else { + if (datasourceSettingsCase_ == 13) { + datasourceSettingsCase_ = 0; + datasourceSettings_ = null; + } + lookerSettingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder + getLookerSettingsBuilder() { + return internalGetLookerSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder + getLookerSettingsOrBuilder() { + if ((datasourceSettingsCase_ == 13) && (lookerSettingsBuilder_ != null)) { + return lookerSettingsBuilder_.getMessageOrBuilder(); + } else { + if (datasourceSettingsCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_; + } + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Looker specific settings.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerSettings, + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder, + com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder> + internalGetLookerSettingsFieldBuilder() { + if (lookerSettingsBuilder_ == null) { + if (!(datasourceSettingsCase_ == 13)) { + datasourceSettings_ = + com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + lookerSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerSettings, + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder, + com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.LookerSettings) datasourceSettings_, + getParentForChildren(), + isClean()); + datasourceSettings_ = null; + } + datasourceSettingsCase_ = 13; + onChanged(); + return lookerSettingsBuilder_; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent value for chat request.
+     * Pattern: `projects/{project}/locations/{location}`
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parent value for chat request.
+     * Pattern: `projects/{project}/locations/{location}`
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parent value for chat request.
+     * Pattern: `projects/{project}/locations/{location}`
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent value for chat request.
+     * Pattern: `projects/{project}/locations/{location}`
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent value for chat request.
+     * Pattern: `projects/{project}/locations/{location}`
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List messages_ = + java.util.Collections.emptyList(); + + private void ensureMessagesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + messages_ = + new java.util.ArrayList(messages_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder> + messagesBuilder_; + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMessagesList() { + if (messagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(messages_); + } else { + return messagesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMessagesCount() { + if (messagesBuilder_ == null) { + return messages_.size(); + } else { + return messagesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Message getMessages(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMessages(int index, com.google.cloud.geminidataanalytics.v1.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.set(index, value); + onChanged(); + } else { + messagesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMessages( + int index, com.google.cloud.geminidataanalytics.v1.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMessages(com.google.cloud.geminidataanalytics.v1.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(value); + onChanged(); + } else { + messagesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMessages(int index, com.google.cloud.geminidataanalytics.v1.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(index, value); + onChanged(); + } else { + messagesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMessages( + com.google.cloud.geminidataanalytics.v1.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMessages( + int index, com.google.cloud.geminidataanalytics.v1.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMessages( + java.lang.Iterable values) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_); + onChanged(); + } else { + messagesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMessages() { + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + messagesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMessages(int index) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.remove(index); + onChanged(); + } else { + messagesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Message.Builder getMessagesBuilder(int index) { + return internalGetMessagesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessagesOrBuilder( + int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMessagesOrBuilderList() { + if (messagesBuilder_ != null) { + return messagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messages_); + } + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Message.Builder addMessagesBuilder() { + return internalGetMessagesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Message.Builder addMessagesBuilder(int index) { + return internalGetMessagesFieldBuilder() + .addBuilder(index, com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Content of current conversation.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMessagesBuilderList() { + return internalGetMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder> + internalGetMessagesFieldBuilder() { + if (messagesBuilder_ == null) { + messagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder>( + messages_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + messages_ = null; + } + return messagesBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Credentials credentials_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Credentials, + com.google.cloud.geminidataanalytics.v1.Credentials.Builder, + com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder> + credentialsBuilder_; + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the credentials field is set. + */ + public boolean hasCredentials() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The credentials. + */ + public com.google.cloud.geminidataanalytics.v1.Credentials getCredentials() { + if (credentialsBuilder_ == null) { + return credentials_ == null + ? com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance() + : credentials_; + } else { + return credentialsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCredentials(com.google.cloud.geminidataanalytics.v1.Credentials value) { + if (credentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + credentials_ = value; + } else { + credentialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCredentials( + com.google.cloud.geminidataanalytics.v1.Credentials.Builder builderForValue) { + if (credentialsBuilder_ == null) { + credentials_ = builderForValue.build(); + } else { + credentialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCredentials(com.google.cloud.geminidataanalytics.v1.Credentials value) { + if (credentialsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && credentials_ != null + && credentials_ + != com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance()) { + getCredentialsBuilder().mergeFrom(value); + } else { + credentials_ = value; + } + } else { + credentialsBuilder_.mergeFrom(value); + } + if (credentials_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCredentials() { + bitField0_ = (bitField0_ & ~0x00000080); + credentials_ = null; + if (credentialsBuilder_ != null) { + credentialsBuilder_.dispose(); + credentialsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Credentials.Builder getCredentialsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetCredentialsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder getCredentialsOrBuilder() { + if (credentialsBuilder_ != null) { + return credentialsBuilder_.getMessageOrBuilder(); + } else { + return credentials_ == null + ? com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance() + : credentials_; + } + } + + /** + * + * + *
+     * Optional. The credentials to use when calling the data source(s) specified
+     * in the context.
+     *
+     * This field can be used to provide credentials for various data sources.
+     * For example, when connecting to Looker, it currently supports both OAuth
+     * token and API key-based credentials, as described in
+     * [Authentication with an
+     * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Credentials, + com.google.cloud.geminidataanalytics.v1.Credentials.Builder, + com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder> + internalGetCredentialsFieldBuilder() { + if (credentialsBuilder_ == null) { + credentialsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Credentials, + com.google.cloud.geminidataanalytics.v1.Credentials.Builder, + com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder>( + getCredentials(), getParentForChildren(), isClean()); + credentials_ = null; + } + return credentialsBuilder_; + } + + private int thinkingMode_ = 0; + + /** + * + * + *
+     * Optional. The thinking mode to use for the agent loop.
+     * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for thinkingMode. + */ + @java.lang.Override + public int getThinkingModeValue() { + return thinkingMode_; + } + + /** + * + * + *
+     * Optional. The thinking mode to use for the agent loop.
+     * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for thinkingMode to set. + * @return This builder for chaining. + */ + public Builder setThinkingModeValue(int value) { + thinkingMode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The thinking mode to use for the agent loop.
+     * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The thinkingMode. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode getThinkingMode() { + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode result = + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode.forNumber(thinkingMode_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The thinking mode to use for the agent loop.
+     * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The thinkingMode to set. + * @return This builder for chaining. + */ + public Builder setThinkingMode( + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + thinkingMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The thinking mode to use for the agent loop.
+     * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearThinkingMode() { + bitField0_ = (bitField0_ & ~0x00000100); + thinkingMode_ = 0; + onChanged(); + return this; + } + + private int model_ = 0; + + /** + * + * + *
+     * Optional. The model to use for the agent loop when processing the request.
+     * This setting only has an effect when context.options.model is not set.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + @java.lang.Override + public int getModelValue() { + return model_; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop when processing the request.
+     * This setting only has an effect when context.options.model is not set.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for model to set. + * @return This builder for chaining. + */ + public Builder setModelValue(int value) { + model_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop when processing the request.
+     * This setting only has an effect when context.options.model is not set.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChatRequest.Model getModel() { + com.google.cloud.geminidataanalytics.v1.ChatRequest.Model result = + com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.forNumber(model_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ChatRequest.Model.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop when processing the request.
+     * This setting only has an effect when context.options.model is not set.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(com.google.cloud.geminidataanalytics.v1.ChatRequest.Model value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + model_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop when processing the request.
+     * This setting only has an effect when context.options.model is not set.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + bitField0_ = (bitField0_ & ~0x00000200); + model_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ChatRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ChatRequest) + private static final com.google.cloud.geminidataanalytics.v1.ChatRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ChatRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.ChatRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ChatRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequestOrBuilder.java new file mode 100644 index 000000000000..ae645f746019 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ChatRequestOrBuilder.java @@ -0,0 +1,494 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ChatRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ChatRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inlineContext field is set. + */ + boolean hasInlineContext(); + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inlineContext. + */ + com.google.cloud.geminidataanalytics.v1.Context getInlineContext(); + + /** + * + * + *
+   * Optional. Inline context for the chat request. Use this to chat
+   * statelessly (without managed conversation persistence and without an
+   * Agent) by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder(); + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conversationReference field is set. + */ + boolean hasConversationReference(); + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conversationReference. + */ + com.google.cloud.geminidataanalytics.v1.ConversationReference getConversationReference(); + + /** + * + * + *
+   * Optional. Reference to a persisted conversation and agent context.
+   * Use this to chat with an Agent using managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder + getConversationReferenceOrBuilder(); + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAgentContext field is set. + */ + boolean hasDataAgentContext(); + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAgentContext. + */ + com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext(); + + /** + * + * + *
+   * Optional. Context for the chat request. Use this to chat with an Agent
+   * statelessly, without managed conversation persistence.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder getDataAgentContextOrBuilder(); + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientManagedResourceContext field is set. + */ + boolean hasClientManagedResourceContext(); + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientManagedResourceContext. + */ + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + getClientManagedResourceContext(); + + /** + * + * + *
+   * Optional. Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder + getClientManagedResourceContextOrBuilder(); + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerSettings field is set. + */ + boolean hasLookerSettings(); + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerSettings. + */ + com.google.cloud.geminidataanalytics.v1.LookerSettings getLookerSettings(); + + /** + * + * + *
+   * Optional. Looker specific settings.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder getLookerSettingsOrBuilder(); + + /** + * + * + *
+   * Required. The parent value for chat request.
+   * Pattern: `projects/{project}/locations/{location}`
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent value for chat request.
+   * Pattern: `projects/{project}/locations/{location}`
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMessagesList(); + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.Message getMessages(int index); + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMessagesCount(); + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMessagesOrBuilderList(); + + /** + * + * + *
+   * Required. Content of current conversation.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessagesOrBuilder(int index); + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the credentials field is set. + */ + boolean hasCredentials(); + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The credentials. + */ + com.google.cloud.geminidataanalytics.v1.Credentials getCredentials(); + + /** + * + * + *
+   * Optional. The credentials to use when calling the data source(s) specified
+   * in the context.
+   *
+   * This field can be used to provide credentials for various data sources.
+   * For example, when connecting to Looker, it currently supports both OAuth
+   * token and API key-based credentials, as described in
+   * [Authentication with an
+   * SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder getCredentialsOrBuilder(); + + /** + * + * + *
+   * Optional. The thinking mode to use for the agent loop.
+   * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for thinkingMode. + */ + int getThinkingModeValue(); + + /** + * + * + *
+   * Optional. The thinking mode to use for the agent loop.
+   * Defaults to THINKING_MODE_UNSPECIFIED if not specified.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The thinkingMode. + */ + com.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode getThinkingMode(); + + /** + * + * + *
+   * Optional. The model to use for the agent loop when processing the request.
+   * This setting only has an effect when context.options.model is not set.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + int getModelValue(); + + /** + * + * + *
+   * Optional. The model to use for the agent loop when processing the request.
+   * This setting only has an effect when context.options.model is not set.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + com.google.cloud.geminidataanalytics.v1.ChatRequest.Model getModel(); + + com.google.cloud.geminidataanalytics.v1.ChatRequest.ContextProviderCase getContextProviderCase(); + + com.google.cloud.geminidataanalytics.v1.ChatRequest.DatasourceSettingsCase + getDatasourceSettingsCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Citation.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Citation.java new file mode 100644 index 000000000000..e58f5d1d364a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Citation.java @@ -0,0 +1,1548 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Source attributions for content.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Citation} + */ +@com.google.protobuf.Generated +public final class Citation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Citation) + CitationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Citation"); + } + + // Use Citation.newBuilder() to construct. + private Citation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Citation() { + sources_ = java.util.Collections.emptyList(); + anchors_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Citation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Citation.class, + com.google.cloud.geminidataanalytics.v1.Citation.Builder.class); + } + + public static final int SOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sources_; + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSourcesList() { + return sources_; + } + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSourcesOrBuilderList() { + return sources_; + } + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); + } + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationSource getSources(int index) { + return sources_.get(index); + } + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder getSourcesOrBuilder( + int index) { + return sources_.get(index); + } + + public static final int ANCHORS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List anchors_; + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getAnchorsList() { + return anchors_; + } + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getAnchorsOrBuilderList() { + return anchors_; + } + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getAnchorsCount() { + return anchors_.size(); + } + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor getAnchors(int index) { + return anchors_.get(index); + } + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder getAnchorsOrBuilder( + int index) { + return anchors_.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 < sources_.size(); i++) { + output.writeMessage(1, sources_.get(i)); + } + for (int i = 0; i < anchors_.size(); i++) { + output.writeMessage(2, anchors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sources_.get(i)); + } + for (int i = 0; i < anchors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, anchors_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.Citation)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Citation other = + (com.google.cloud.geminidataanalytics.v1.Citation) obj; + + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getAnchorsList().equals(other.getAnchorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + if (getAnchorsCount() > 0) { + hash = (37 * hash) + ANCHORS_FIELD_NUMBER; + hash = (53 * hash) + getAnchorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation 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.geminidataanalytics.v1.Citation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation 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.geminidataanalytics.v1.Citation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Citation 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Source attributions for content.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Citation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Citation) + com.google.cloud.geminidataanalytics.v1.CitationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Citation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Citation.class, + com.google.cloud.geminidataanalytics.v1.Citation.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Citation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + } else { + sources_ = null; + sourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (anchorsBuilder_ == null) { + anchors_ = java.util.Collections.emptyList(); + } else { + anchors_ = null; + anchorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Citation getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Citation build() { + com.google.cloud.geminidataanalytics.v1.Citation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Citation buildPartial() { + com.google.cloud.geminidataanalytics.v1.Citation result = + new com.google.cloud.geminidataanalytics.v1.Citation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.Citation result) { + if (sourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sources_ = sources_; + } else { + result.sources_ = sourcesBuilder_.build(); + } + if (anchorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + anchors_ = java.util.Collections.unmodifiableList(anchors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.anchors_ = anchors_; + } else { + result.anchors_ = anchorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Citation result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Citation) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Citation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Citation other) { + if (other == com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance()) + return this; + if (sourcesBuilder_ == null) { + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + } else { + if (!other.sources_.isEmpty()) { + if (sourcesBuilder_.isEmpty()) { + sourcesBuilder_.dispose(); + sourcesBuilder_ = null; + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + sourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSourcesFieldBuilder() + : null; + } else { + sourcesBuilder_.addAllMessages(other.sources_); + } + } + } + if (anchorsBuilder_ == null) { + if (!other.anchors_.isEmpty()) { + if (anchors_.isEmpty()) { + anchors_ = other.anchors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAnchorsIsMutable(); + anchors_.addAll(other.anchors_); + } + onChanged(); + } + } else { + if (!other.anchors_.isEmpty()) { + if (anchorsBuilder_.isEmpty()) { + anchorsBuilder_.dispose(); + anchorsBuilder_ = null; + anchors_ = other.anchors_; + bitField0_ = (bitField0_ & ~0x00000002); + anchorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAnchorsFieldBuilder() + : null; + } else { + anchorsBuilder_.addAllMessages(other.anchors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.CitationSource m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.CitationSource.parser(), + extensionRegistry); + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(m); + } else { + sourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.geminidataanalytics.v1.CitationAnchor m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.parser(), + extensionRegistry); + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + anchors_.add(m); + } else { + anchorsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List sources_ = + java.util.Collections.emptyList(); + + private void ensureSourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sources_ = + new java.util.ArrayList( + sources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationSource, + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder, + com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder> + sourcesBuilder_; + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSourcesList() { + if (sourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sources_); + } else { + return sourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSourcesCount() { + if (sourcesBuilder_ == null) { + return sources_.size(); + } else { + return sourcesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationSource getSources(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSources( + int index, com.google.cloud.geminidataanalytics.v1.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.set(index, value); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSources( + int index, com.google.cloud.geminidataanalytics.v1.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.set(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSources(com.google.cloud.geminidataanalytics.v1.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + onChanged(); + } else { + sourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSources( + int index, com.google.cloud.geminidataanalytics.v1.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(index, value); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSources( + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSources( + int index, com.google.cloud.geminidataanalytics.v1.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSources( + java.lang.Iterable + values) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + onChanged(); + } else { + sourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSources() { + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSources(int index) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.remove(index); + onChanged(); + } else { + sourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationSource.Builder getSourcesBuilder( + int index) { + return internalGetSourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder getSourcesOrBuilder( + int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourcesOrBuilderList() { + if (sourcesBuilder_ != null) { + return sourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sources_); + } + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationSource.Builder addSourcesBuilder() { + return internalGetSourcesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.CitationSource.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationSource.Builder addSourcesBuilder( + int index) { + return internalGetSourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.CitationSource.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of the sources being cited.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourcesBuilderList() { + return internalGetSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationSource, + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder, + com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder> + internalGetSourcesFieldBuilder() { + if (sourcesBuilder_ == null) { + sourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationSource, + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder, + com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder>( + sources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sources_ = null; + } + return sourcesBuilder_; + } + + private java.util.List anchors_ = + java.util.Collections.emptyList(); + + private void ensureAnchorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + anchors_ = + new java.util.ArrayList( + anchors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder> + anchorsBuilder_; + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getAnchorsList() { + if (anchorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(anchors_); + } else { + return anchorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getAnchorsCount() { + if (anchorsBuilder_ == null) { + return anchors_.size(); + } else { + return anchorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchor getAnchors(int index) { + if (anchorsBuilder_ == null) { + return anchors_.get(index); + } else { + return anchorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnchors( + int index, com.google.cloud.geminidataanalytics.v1.CitationAnchor value) { + if (anchorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnchorsIsMutable(); + anchors_.set(index, value); + onChanged(); + } else { + anchorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnchors( + int index, com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder builderForValue) { + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + anchors_.set(index, builderForValue.build()); + onChanged(); + } else { + anchorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAnchors(com.google.cloud.geminidataanalytics.v1.CitationAnchor value) { + if (anchorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnchorsIsMutable(); + anchors_.add(value); + onChanged(); + } else { + anchorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAnchors( + int index, com.google.cloud.geminidataanalytics.v1.CitationAnchor value) { + if (anchorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnchorsIsMutable(); + anchors_.add(index, value); + onChanged(); + } else { + anchorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAnchors( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder builderForValue) { + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + anchors_.add(builderForValue.build()); + onChanged(); + } else { + anchorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAnchors( + int index, com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder builderForValue) { + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + anchors_.add(index, builderForValue.build()); + onChanged(); + } else { + anchorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllAnchors( + java.lang.Iterable + values) { + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, anchors_); + onChanged(); + } else { + anchorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAnchors() { + if (anchorsBuilder_ == null) { + anchors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + anchorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAnchors(int index) { + if (anchorsBuilder_ == null) { + ensureAnchorsIsMutable(); + anchors_.remove(index); + onChanged(); + } else { + anchorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder getAnchorsBuilder( + int index) { + return internalGetAnchorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder getAnchorsOrBuilder( + int index) { + if (anchorsBuilder_ == null) { + return anchors_.get(index); + } else { + return anchorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getAnchorsOrBuilderList() { + if (anchorsBuilder_ != null) { + return anchorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(anchors_); + } + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder addAnchorsBuilder() { + return internalGetAnchorsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.CitationAnchor.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder addAnchorsBuilder( + int index) { + return internalGetAnchorsFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.CitationAnchor.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of the anchors of the citations.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getAnchorsBuilderList() { + return internalGetAnchorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder> + internalGetAnchorsFieldBuilder() { + if (anchorsBuilder_ == null) { + anchorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder>( + anchors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + anchors_ = null; + } + return anchorsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Citation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Citation) + private static final com.google.cloud.geminidataanalytics.v1.Citation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Citation(); + } + + public static com.google.cloud.geminidataanalytics.v1.Citation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Citation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Citation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchor.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchor.java new file mode 100644 index 000000000000..3367f6d0315e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchor.java @@ -0,0 +1,1992 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The anchor of the citation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CitationAnchor} + */ +@com.google.protobuf.Generated +public final class CitationAnchor extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.CitationAnchor) + CitationAnchorOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CitationAnchor"); + } + + // Use CitationAnchor.newBuilder() to construct. + private CitationAnchor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CitationAnchor() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.class, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder.class); + } + + public interface TextMessageCitationAnchorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The 0-based index of the part within the TextMessage.parts
+     * field.
+     * 
+ * + * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The partIndex. + */ + int getPartIndex(); + + /** + * + * + *
+     * Output only. The offset, measured in UTF-8 bytes, within the part string
+     * where the citation begins (inclusive). Example: For the text "Hello,
+     * world" where "world" is cited, the start offset bytes (inclusive) is 7
+     * and the end offset bytes (exclusive) is 12.
+     * 
+ * + * int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startOffsetBytes. + */ + int getStartOffsetBytes(); + + /** + * + * + *
+     * Output only. The offset, measured in UTF-8 bytes, within the part string
+     * where the citation ends (exclusive). Example: For the text "Hello, world"
+     * where "world" is cited, the start offset bytes (inclusive) is 7 and the
+     * end offset bytes (exclusive) is 12.
+     * 
+ * + * int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endOffsetBytes. + */ + int getEndOffsetBytes(); + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sourceIds. + */ + java.util.List getSourceIdsList(); + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sourceIds. + */ + int getSourceIdsCount(); + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sourceIds at the given index. + */ + java.lang.String getSourceIds(int index); + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceIds at the given index. + */ + com.google.protobuf.ByteString getSourceIdsBytes(int index); + } + + /** + * + * + *
+   * Citation anchor within a TextMessage.
+   * 
+ * + * Protobuf type {@code + * google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor} + */ + public static final class TextMessageCitationAnchor extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + TextMessageCitationAnchorOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextMessageCitationAnchor"); + } + + // Use TextMessageCitationAnchor.newBuilder() to construct. + private TextMessageCitationAnchor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TextMessageCitationAnchor() { + sourceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .class, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .Builder.class); + } + + public static final int PART_INDEX_FIELD_NUMBER = 1; + private int partIndex_ = 0; + + /** + * + * + *
+     * Output only. The 0-based index of the part within the TextMessage.parts
+     * field.
+     * 
+ * + * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The partIndex. + */ + @java.lang.Override + public int getPartIndex() { + return partIndex_; + } + + public static final int START_OFFSET_BYTES_FIELD_NUMBER = 2; + private int startOffsetBytes_ = 0; + + /** + * + * + *
+     * Output only. The offset, measured in UTF-8 bytes, within the part string
+     * where the citation begins (inclusive). Example: For the text "Hello,
+     * world" where "world" is cited, the start offset bytes (inclusive) is 7
+     * and the end offset bytes (exclusive) is 12.
+     * 
+ * + * int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startOffsetBytes. + */ + @java.lang.Override + public int getStartOffsetBytes() { + return startOffsetBytes_; + } + + public static final int END_OFFSET_BYTES_FIELD_NUMBER = 3; + private int endOffsetBytes_ = 0; + + /** + * + * + *
+     * Output only. The offset, measured in UTF-8 bytes, within the part string
+     * where the citation ends (exclusive). Example: For the text "Hello, world"
+     * where "world" is cited, the start offset bytes (inclusive) is 7 and the
+     * end offset bytes (exclusive) is 12.
+     * 
+ * + * int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endOffsetBytes. + */ + @java.lang.Override + public int getEndOffsetBytes() { + return endOffsetBytes_; + } + + public static final int SOURCE_IDS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sourceIds. + */ + public com.google.protobuf.ProtocolStringList getSourceIdsList() { + return sourceIds_; + } + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sourceIds. + */ + public int getSourceIdsCount() { + return sourceIds_.size(); + } + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sourceIds at the given index. + */ + public java.lang.String getSourceIds(int index) { + return sourceIds_.get(index); + } + + /** + * + * + *
+     * Output only. The ids of the sources that are cited.
+     * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceIds at the given index. + */ + public com.google.protobuf.ByteString getSourceIdsBytes(int index) { + return sourceIds_.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 (partIndex_ != 0) { + output.writeInt32(1, partIndex_); + } + if (startOffsetBytes_ != 0) { + output.writeInt32(2, startOffsetBytes_); + } + if (endOffsetBytes_ != 0) { + output.writeInt32(3, endOffsetBytes_); + } + for (int i = 0; i < sourceIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, sourceIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, partIndex_); + } + if (startOffsetBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, startOffsetBytes_); + } + if (endOffsetBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, endOffsetBytes_); + } + { + int dataSize = 0; + for (int i = 0; i < sourceIds_.size(); i++) { + dataSize += computeStringSizeNoTag(sourceIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourceIdsList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor other = + (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) obj; + + if (getPartIndex() != other.getPartIndex()) return false; + if (getStartOffsetBytes() != other.getStartOffsetBytes()) return false; + if (getEndOffsetBytes() != other.getEndOffsetBytes()) return false; + if (!getSourceIdsList().equals(other.getSourceIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PART_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getPartIndex(); + hash = (37 * hash) + START_OFFSET_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getStartOffsetBytes(); + hash = (37 * hash) + END_OFFSET_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getEndOffsetBytes(); + if (getSourceIdsCount() > 0) { + hash = (37 * hash) + SOURCE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSourceIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + 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.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + 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.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Citation anchor within a TextMessage.
+     * 
+ * + * Protobuf type {@code + * google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .class, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partIndex_ = 0; + startOffsetBytes_ = 0; + endOffsetBytes_ = 0; + sourceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + build() { + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + buildPartial() { + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor result = + new com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partIndex_ = partIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startOffsetBytes_ = startOffsetBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endOffsetBytes_ = endOffsetBytes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + sourceIds_.makeImmutable(); + result.sourceIds_ = sourceIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor other) { + if (other + == com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance()) return this; + if (other.getPartIndex() != 0) { + setPartIndex(other.getPartIndex()); + } + if (other.getStartOffsetBytes() != 0) { + setStartOffsetBytes(other.getStartOffsetBytes()); + } + if (other.getEndOffsetBytes() != 0) { + setEndOffsetBytes(other.getEndOffsetBytes()); + } + if (!other.sourceIds_.isEmpty()) { + if (sourceIds_.isEmpty()) { + sourceIds_ = other.sourceIds_; + bitField0_ |= 0x00000008; + } else { + ensureSourceIdsIsMutable(); + sourceIds_.addAll(other.sourceIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + partIndex_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + startOffsetBytes_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + endOffsetBytes_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceIdsIsMutable(); + sourceIds_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int partIndex_; + + /** + * + * + *
+       * Output only. The 0-based index of the part within the TextMessage.parts
+       * field.
+       * 
+ * + * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The partIndex. + */ + @java.lang.Override + public int getPartIndex() { + return partIndex_; + } + + /** + * + * + *
+       * Output only. The 0-based index of the part within the TextMessage.parts
+       * field.
+       * 
+ * + * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The partIndex to set. + * @return This builder for chaining. + */ + public Builder setPartIndex(int value) { + + partIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The 0-based index of the part within the TextMessage.parts
+       * field.
+       * 
+ * + * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPartIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + partIndex_ = 0; + onChanged(); + return this; + } + + private int startOffsetBytes_; + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation begins (inclusive). Example: For the text "Hello,
+       * world" where "world" is cited, the start offset bytes (inclusive) is 7
+       * and the end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startOffsetBytes. + */ + @java.lang.Override + public int getStartOffsetBytes() { + return startOffsetBytes_; + } + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation begins (inclusive). Example: For the text "Hello,
+       * world" where "world" is cited, the start offset bytes (inclusive) is 7
+       * and the end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The startOffsetBytes to set. + * @return This builder for chaining. + */ + public Builder setStartOffsetBytes(int value) { + + startOffsetBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation begins (inclusive). Example: For the text "Hello,
+       * world" where "world" is cited, the start offset bytes (inclusive) is 7
+       * and the end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStartOffsetBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + startOffsetBytes_ = 0; + onChanged(); + return this; + } + + private int endOffsetBytes_; + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation ends (exclusive). Example: For the text "Hello, world"
+       * where "world" is cited, the start offset bytes (inclusive) is 7 and the
+       * end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endOffsetBytes. + */ + @java.lang.Override + public int getEndOffsetBytes() { + return endOffsetBytes_; + } + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation ends (exclusive). Example: For the text "Hello, world"
+       * where "world" is cited, the start offset bytes (inclusive) is 7 and the
+       * end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The endOffsetBytes to set. + * @return This builder for chaining. + */ + public Builder setEndOffsetBytes(int value) { + + endOffsetBytes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The offset, measured in UTF-8 bytes, within the part string
+       * where the citation ends (exclusive). Example: For the text "Hello, world"
+       * where "world" is cited, the start offset bytes (inclusive) is 7 and the
+       * end offset bytes (exclusive) is 12.
+       * 
+ * + * int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEndOffsetBytes() { + bitField0_ = (bitField0_ & ~0x00000004); + endOffsetBytes_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sourceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourceIdsIsMutable() { + if (!sourceIds_.isModifiable()) { + sourceIds_ = new com.google.protobuf.LazyStringArrayList(sourceIds_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sourceIds. + */ + public com.google.protobuf.ProtocolStringList getSourceIdsList() { + sourceIds_.makeImmutable(); + return sourceIds_; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sourceIds. + */ + public int getSourceIdsCount() { + return sourceIds_.size(); + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sourceIds at the given index. + */ + public java.lang.String getSourceIds(int index) { + return sourceIds_.get(index); + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceIds at the given index. + */ + public com.google.protobuf.ByteString getSourceIdsBytes(int index) { + return sourceIds_.getByteString(index); + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The sourceIds to set. + * @return This builder for chaining. + */ + public Builder setSourceIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceIdsIsMutable(); + sourceIds_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sourceIds to add. + * @return This builder for chaining. + */ + public Builder addSourceIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceIdsIsMutable(); + sourceIds_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The sourceIds to add. + * @return This builder for chaining. + */ + public Builder addAllSourceIds(java.lang.Iterable values) { + ensureSourceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceIds_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourceIds() { + sourceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The ids of the sources that are cited.
+       * 
+ * + * repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the sourceIds to add. + * @return This builder for chaining. + */ + public Builder addSourceIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourceIdsIsMutable(); + sourceIds_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + private static final com.google.cloud.geminidataanalytics.v1.CitationAnchor + .TextMessageCitationAnchor + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor(); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextMessageCitationAnchor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int anchorTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object anchorType_; + + public enum AnchorTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_MESSAGE_ANCHOR(1), + ANCHORTYPE_NOT_SET(0); + private final int value; + + private AnchorTypeCase(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 AnchorTypeCase valueOf(int value) { + return forNumber(value); + } + + public static AnchorTypeCase forNumber(int value) { + switch (value) { + case 1: + return TEXT_MESSAGE_ANCHOR; + case 0: + return ANCHORTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AnchorTypeCase getAnchorTypeCase() { + return AnchorTypeCase.forNumber(anchorTypeCase_); + } + + public static final int TEXT_MESSAGE_ANCHOR_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the textMessageAnchor field is set. + */ + @java.lang.Override + public boolean hasTextMessageAnchor() { + return anchorTypeCase_ == 1; + } + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The textMessageAnchor. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getTextMessageAnchor() { + if (anchorTypeCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_; + } + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchorOrBuilder + getTextMessageAnchorOrBuilder() { + if (anchorTypeCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_; + } + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .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 (anchorTypeCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (anchorTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_); + } + size += getUnknownFields().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.geminidataanalytics.v1.CitationAnchor)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.CitationAnchor other = + (com.google.cloud.geminidataanalytics.v1.CitationAnchor) obj; + + if (!getAnchorTypeCase().equals(other.getAnchorTypeCase())) return false; + switch (anchorTypeCase_) { + case 1: + if (!getTextMessageAnchor().equals(other.getTextMessageAnchor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (anchorTypeCase_) { + case 1: + hash = (37 * hash) + TEXT_MESSAGE_ANCHOR_FIELD_NUMBER; + hash = (53 * hash) + getTextMessageAnchor().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor 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.geminidataanalytics.v1.CitationAnchor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor 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.geminidataanalytics.v1.CitationAnchor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.CitationAnchor 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The anchor of the citation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CitationAnchor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.CitationAnchor) + com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.class, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.CitationAnchor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textMessageAnchorBuilder_ != null) { + textMessageAnchorBuilder_.clear(); + } + anchorTypeCase_ = 0; + anchorType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor build() { + com.google.cloud.geminidataanalytics.v1.CitationAnchor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor buildPartial() { + com.google.cloud.geminidataanalytics.v1.CitationAnchor result = + new com.google.cloud.geminidataanalytics.v1.CitationAnchor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.CitationAnchor result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.CitationAnchor result) { + result.anchorTypeCase_ = anchorTypeCase_; + result.anchorType_ = this.anchorType_; + if (anchorTypeCase_ == 1 && textMessageAnchorBuilder_ != null) { + result.anchorType_ = textMessageAnchorBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.CitationAnchor) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.CitationAnchor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.CitationAnchor other) { + if (other == com.google.cloud.geminidataanalytics.v1.CitationAnchor.getDefaultInstance()) + return this; + switch (other.getAnchorTypeCase()) { + case TEXT_MESSAGE_ANCHOR: + { + mergeTextMessageAnchor(other.getTextMessageAnchor()); + break; + } + case ANCHORTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetTextMessageAnchorFieldBuilder().getBuilder(), extensionRegistry); + anchorTypeCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int anchorTypeCase_ = 0; + private java.lang.Object anchorType_; + + public AnchorTypeCase getAnchorTypeCase() { + return AnchorTypeCase.forNumber(anchorTypeCase_); + } + + public Builder clearAnchorType() { + anchorTypeCase_ = 0; + anchorType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchor + .TextMessageCitationAnchorOrBuilder> + textMessageAnchorBuilder_; + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the textMessageAnchor field is set. + */ + @java.lang.Override + public boolean hasTextMessageAnchor() { + return anchorTypeCase_ == 1; + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The textMessageAnchor. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getTextMessageAnchor() { + if (textMessageAnchorBuilder_ == null) { + if (anchorTypeCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_; + } + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } else { + if (anchorTypeCase_ == 1) { + return textMessageAnchorBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTextMessageAnchor( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor value) { + if (textMessageAnchorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorType_ = value; + onChanged(); + } else { + textMessageAnchorBuilder_.setMessage(value); + } + anchorTypeCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTextMessageAnchor( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor.Builder + builderForValue) { + if (textMessageAnchorBuilder_ == null) { + anchorType_ = builderForValue.build(); + onChanged(); + } else { + textMessageAnchorBuilder_.setMessage(builderForValue.build()); + } + anchorTypeCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTextMessageAnchor( + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor value) { + if (textMessageAnchorBuilder_ == null) { + if (anchorTypeCase_ == 1 + && anchorType_ + != com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance()) { + anchorType_ = + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .newBuilder( + (com.google.cloud.geminidataanalytics.v1.CitationAnchor + .TextMessageCitationAnchor) + anchorType_) + .mergeFrom(value) + .buildPartial(); + } else { + anchorType_ = value; + } + onChanged(); + } else { + if (anchorTypeCase_ == 1) { + textMessageAnchorBuilder_.mergeFrom(value); + } else { + textMessageAnchorBuilder_.setMessage(value); + } + } + anchorTypeCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTextMessageAnchor() { + if (textMessageAnchorBuilder_ == null) { + if (anchorTypeCase_ == 1) { + anchorTypeCase_ = 0; + anchorType_ = null; + onChanged(); + } + } else { + if (anchorTypeCase_ == 1) { + anchorTypeCase_ = 0; + anchorType_ = null; + } + textMessageAnchorBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor.Builder + getTextMessageAnchorBuilder() { + return internalGetTextMessageAnchorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchorOrBuilder + getTextMessageAnchorOrBuilder() { + if ((anchorTypeCase_ == 1) && (textMessageAnchorBuilder_ != null)) { + return textMessageAnchorBuilder_.getMessageOrBuilder(); + } else { + if (anchorTypeCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_; + } + return com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Only set if the citation is for a TextMessage.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchor + .TextMessageCitationAnchorOrBuilder> + internalGetTextMessageAnchorFieldBuilder() { + if (textMessageAnchorBuilder_ == null) { + if (!(anchorTypeCase_ == 1)) { + anchorType_ = + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .getDefaultInstance(); + } + textMessageAnchorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor, + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + .Builder, + com.google.cloud.geminidataanalytics.v1.CitationAnchor + .TextMessageCitationAnchorOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor) + anchorType_, + getParentForChildren(), + isClean()); + anchorType_ = null; + } + anchorTypeCase_ = 1; + onChanged(); + return textMessageAnchorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.CitationAnchor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.CitationAnchor) + private static final com.google.cloud.geminidataanalytics.v1.CitationAnchor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.CitationAnchor(); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationAnchor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CitationAnchor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.CitationAnchor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchorOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchorOrBuilder.java new file mode 100644 index 000000000000..c25b4255c21b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationAnchorOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CitationAnchorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.CitationAnchor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the textMessageAnchor field is set. + */ + boolean hasTextMessageAnchor(); + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The textMessageAnchor. + */ + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor + getTextMessageAnchor(); + + /** + * + * + *
+   * Output only. Only set if the citation is for a TextMessage.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor text_message_anchor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchorOrBuilder + getTextMessageAnchorOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.CitationAnchor.AnchorTypeCase getAnchorTypeCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationOrBuilder.java new file mode 100644 index 000000000000..fbdf0ecccfbd --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CitationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Citation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSourcesList(); + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationSource getSources(int index); + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSourcesCount(); + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSourcesOrBuilderList(); + + /** + * + * + *
+   * Output only. List of the sources being cited.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationSource sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder getSourcesOrBuilder(int index); + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getAnchorsList(); + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationAnchor getAnchors(int index); + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAnchorsCount(); + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getAnchorsOrBuilderList(); + + /** + * + * + *
+   * Output only. List of the anchors of the citations.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.CitationAnchor anchors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationAnchorOrBuilder getAnchorsOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSource.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSource.java new file mode 100644 index 000000000000..5ac63e154a5b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSource.java @@ -0,0 +1,1784 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The source of the citation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CitationSource} + */ +@com.google.protobuf.Generated +public final class CitationSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.CitationSource) + CitationSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CitationSource"); + } + + // Use CitationSource.newBuilder() to construct. + private CitationSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CitationSource() { + id_ = ""; + title_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationSource.class, + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder.class); + } + + private int sourceTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceType_; + + public enum SourceTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + URI(3), + EXAMPLE_QUERY(4), + GLOSSARY_TERM(5), + SOURCETYPE_NOT_SET(0); + private final int value; + + private SourceTypeCase(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 SourceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static SourceTypeCase forNumber(int value) { + switch (value) { + case 3: + return URI; + case 4: + return EXAMPLE_QUERY; + case 5: + return GLOSSARY_TERM; + case 0: + return SOURCETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceTypeCase getSourceTypeCase() { + return SourceTypeCase.forNumber(sourceTypeCase_); + } + + public static final int URI_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return sourceTypeCase_ == 3; + } + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 3) { + ref = sourceType_; + } + 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 (sourceTypeCase_ == 3) { + sourceType_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 3) { + ref = sourceType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceTypeCase_ == 3) { + sourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXAMPLE_QUERY_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the exampleQuery field is set. + */ + @java.lang.Override + public boolean hasExampleQuery() { + return sourceTypeCase_ == 4; + } + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The exampleQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery() { + if (sourceTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueryOrBuilder() { + if (sourceTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + + public static final int GLOSSARY_TERM_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the glossaryTerm field is set. + */ + @java.lang.Override + public boolean hasGlossaryTerm() { + return sourceTypeCase_ == 5; + } + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The glossaryTerm. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerm() { + if (sourceTypeCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder getGlossaryTermOrBuilder() { + if (sourceTypeCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + + /** + * + * + *
+   * Output only. Unique identifier of the source. This ID is service-generated
+   * and is unique within the scope of a single `Citation` message.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Unique identifier of the source. This ID is service-generated
+   * and is unique within the scope of a single `Citation` message.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+   * Output only. The title of the source.
+   * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The title of the source.
+   * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + if (sourceTypeCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sourceType_); + } + if (sourceTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_); + } + if (sourceTypeCase_ == 5) { + output.writeMessage(5, (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + if (sourceTypeCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sourceType_); + } + if (sourceTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_); + } + if (sourceTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_); + } + size += getUnknownFields().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.geminidataanalytics.v1.CitationSource)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.CitationSource other = + (com.google.cloud.geminidataanalytics.v1.CitationSource) obj; + + if (!getId().equals(other.getId())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getSourceTypeCase().equals(other.getSourceTypeCase())) return false; + switch (sourceTypeCase_) { + case 3: + if (!getUri().equals(other.getUri())) return false; + break; + case 4: + if (!getExampleQuery().equals(other.getExampleQuery())) return false; + break; + case 5: + if (!getGlossaryTerm().equals(other.getGlossaryTerm())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + switch (sourceTypeCase_) { + case 3: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 4: + hash = (37 * hash) + EXAMPLE_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getExampleQuery().hashCode(); + break; + case 5: + hash = (37 * hash) + GLOSSARY_TERM_FIELD_NUMBER; + hash = (53 * hash) + getGlossaryTerm().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource 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.geminidataanalytics.v1.CitationSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource 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.geminidataanalytics.v1.CitationSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.CitationSource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The source of the citation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CitationSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.CitationSource) + com.google.cloud.geminidataanalytics.v1.CitationSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CitationSource.class, + com.google.cloud.geminidataanalytics.v1.CitationSource.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.CitationSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (exampleQueryBuilder_ != null) { + exampleQueryBuilder_.clear(); + } + if (glossaryTermBuilder_ != null) { + glossaryTermBuilder_.clear(); + } + id_ = ""; + title_ = ""; + sourceTypeCase_ = 0; + sourceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationSource getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.CitationSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationSource build() { + com.google.cloud.geminidataanalytics.v1.CitationSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationSource buildPartial() { + com.google.cloud.geminidataanalytics.v1.CitationSource result = + new com.google.cloud.geminidataanalytics.v1.CitationSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.CitationSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.title_ = title_; + } + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.CitationSource result) { + result.sourceTypeCase_ = sourceTypeCase_; + result.sourceType_ = this.sourceType_; + if (sourceTypeCase_ == 4 && exampleQueryBuilder_ != null) { + result.sourceType_ = exampleQueryBuilder_.build(); + } + if (sourceTypeCase_ == 5 && glossaryTermBuilder_ != null) { + result.sourceType_ = glossaryTermBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.CitationSource) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.CitationSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.CitationSource other) { + if (other == com.google.cloud.geminidataanalytics.v1.CitationSource.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getSourceTypeCase()) { + case URI: + { + sourceTypeCase_ = 3; + sourceType_ = other.sourceType_; + onChanged(); + break; + } + case EXAMPLE_QUERY: + { + mergeExampleQuery(other.getExampleQuery()); + break; + } + case GLOSSARY_TERM: + { + mergeGlossaryTerm(other.getGlossaryTerm()); + break; + } + case SOURCETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceTypeCase_ = 3; + sourceType_ = s; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetExampleQueryFieldBuilder().getBuilder(), extensionRegistry); + sourceTypeCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetGlossaryTermFieldBuilder().getBuilder(), extensionRegistry); + sourceTypeCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceTypeCase_ = 0; + private java.lang.Object sourceType_; + + public SourceTypeCase getSourceTypeCase() { + return SourceTypeCase.forNumber(sourceTypeCase_); + } + + public Builder clearSourceType() { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return sourceTypeCase_ == 3; + } + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 3) { + ref = sourceType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceTypeCase_ == 3) { + sourceType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 3) { + ref = sourceType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceTypeCase_ == 3) { + sourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceTypeCase_ = 3; + sourceType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (sourceTypeCase_ == 3) { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The uri used as the source, such as a web grounding URL.
+     * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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); + sourceTypeCase_ = 3; + sourceType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + exampleQueryBuilder_; + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the exampleQuery field is set. + */ + @java.lang.Override + public boolean hasExampleQuery() { + return sourceTypeCase_ == 4; + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The exampleQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery() { + if (exampleQueryBuilder_ == null) { + if (sourceTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } else { + if (sourceTypeCase_ == 4) { + return exampleQueryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExampleQuery(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceType_ = value; + onChanged(); + } else { + exampleQueryBuilder_.setMessage(value); + } + sourceTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExampleQuery( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueryBuilder_ == null) { + sourceType_ = builderForValue.build(); + onChanged(); + } else { + exampleQueryBuilder_.setMessage(builderForValue.build()); + } + sourceTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExampleQuery(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueryBuilder_ == null) { + if (sourceTypeCase_ == 4 + && sourceType_ + != com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()) { + sourceType_ = + com.google.cloud.geminidataanalytics.v1.ExampleQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceType_ = value; + } + onChanged(); + } else { + if (sourceTypeCase_ == 4) { + exampleQueryBuilder_.mergeFrom(value); + } else { + exampleQueryBuilder_.setMessage(value); + } + } + sourceTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExampleQuery() { + if (exampleQueryBuilder_ == null) { + if (sourceTypeCase_ == 4) { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + } + } else { + if (sourceTypeCase_ == 4) { + sourceTypeCase_ = 0; + sourceType_ = null; + } + exampleQueryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder getExampleQueryBuilder() { + return internalGetExampleQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder + getExampleQueryOrBuilder() { + if ((sourceTypeCase_ == 4) && (exampleQueryBuilder_ != null)) { + return exampleQueryBuilder_.getMessageOrBuilder(); + } else { + if (sourceTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The example query used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + internalGetExampleQueryFieldBuilder() { + if (exampleQueryBuilder_ == null) { + if (!(sourceTypeCase_ == 4)) { + sourceType_ = com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + exampleQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ExampleQuery) sourceType_, + getParentForChildren(), + isClean()); + sourceType_ = null; + } + sourceTypeCase_ = 4; + onChanged(); + return exampleQueryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder> + glossaryTermBuilder_; + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the glossaryTerm field is set. + */ + @java.lang.Override + public boolean hasGlossaryTerm() { + return sourceTypeCase_ == 5; + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The glossaryTerm. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerm() { + if (glossaryTermBuilder_ == null) { + if (sourceTypeCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } else { + if (sourceTypeCase_ == 5) { + return glossaryTermBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGlossaryTerm(com.google.cloud.geminidataanalytics.v1.GlossaryTerm value) { + if (glossaryTermBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceType_ = value; + onChanged(); + } else { + glossaryTermBuilder_.setMessage(value); + } + sourceTypeCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGlossaryTerm( + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder builderForValue) { + if (glossaryTermBuilder_ == null) { + sourceType_ = builderForValue.build(); + onChanged(); + } else { + glossaryTermBuilder_.setMessage(builderForValue.build()); + } + sourceTypeCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGlossaryTerm(com.google.cloud.geminidataanalytics.v1.GlossaryTerm value) { + if (glossaryTermBuilder_ == null) { + if (sourceTypeCase_ == 5 + && sourceType_ + != com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance()) { + sourceType_ = + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.newBuilder( + (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceType_ = value; + } + onChanged(); + } else { + if (sourceTypeCase_ == 5) { + glossaryTermBuilder_.mergeFrom(value); + } else { + glossaryTermBuilder_.setMessage(value); + } + } + sourceTypeCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGlossaryTerm() { + if (glossaryTermBuilder_ == null) { + if (sourceTypeCase_ == 5) { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + } + } else { + if (sourceTypeCase_ == 5) { + sourceTypeCase_ = 0; + sourceType_ = null; + } + glossaryTermBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder getGlossaryTermBuilder() { + return internalGetGlossaryTermFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder + getGlossaryTermOrBuilder() { + if ((sourceTypeCase_ == 5) && (glossaryTermBuilder_ != null)) { + return glossaryTermBuilder_.getMessageOrBuilder(); + } else { + if (sourceTypeCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_; + } + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The glossary term used as the source.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder> + internalGetGlossaryTermFieldBuilder() { + if (glossaryTermBuilder_ == null) { + if (!(sourceTypeCase_ == 5)) { + sourceType_ = com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + glossaryTermBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) sourceType_, + getParentForChildren(), + isClean()); + sourceType_ = null; + } + sourceTypeCase_ = 5; + onChanged(); + return glossaryTermBuilder_; + } + + private java.lang.Object id_ = ""; + + /** + * + * + *
+     * Output only. Unique identifier of the source. This ID is service-generated
+     * and is unique within the scope of a single `Citation` message.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Unique identifier of the source. This ID is service-generated
+     * and is unique within the scope of a single `Citation` message.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Unique identifier of the source. This ID is service-generated
+     * and is unique within the scope of a single `Citation` message.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the source. This ID is service-generated
+     * and is unique within the scope of a single `Citation` message.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the source. This ID is service-generated
+     * and is unique within the scope of a single `Citation` message.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
+     * Output only. The title of the source.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The title of the source.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The title of the source.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The title of the source.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The title of the source.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.CitationSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.CitationSource) + private static final com.google.cloud.geminidataanalytics.v1.CitationSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.CitationSource(); + } + + public static com.google.cloud.geminidataanalytics.v1.CitationSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CitationSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.CitationSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSourceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSourceOrBuilder.java new file mode 100644 index 000000000000..69ee91a74463 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CitationSourceOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CitationSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.CitationSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * Output only. The uri used as the source, such as a web grounding URL.
+   * 
+ * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the exampleQuery field is set. + */ + boolean hasExampleQuery(); + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The exampleQuery. + */ + com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery(); + + /** + * + * + *
+   * Output only. The example query used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueryOrBuilder(); + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the glossaryTerm field is set. + */ + boolean hasGlossaryTerm(); + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The glossaryTerm. + */ + com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerm(); + + /** + * + * + *
+   * Output only. The glossary term used as the source.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_term = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder getGlossaryTermOrBuilder(); + + /** + * + * + *
+   * Output only. Unique identifier of the source. This ID is service-generated
+   * and is unique within the scope of a single `Citation` message.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + + /** + * + * + *
+   * Output only. Unique identifier of the source. This ID is service-generated
+   * and is unique within the scope of a single `Citation` message.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. The title of the source.
+   * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+   * Output only. The title of the source.
+   * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + com.google.cloud.geminidataanalytics.v1.CitationSource.SourceTypeCase getSourceTypeCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContext.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContext.java new file mode 100644 index 000000000000..53661ea0f927 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContext.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Context with client managed resources.
+ * Some clients may not use GDA managed resources including
+ * conversations and agents, instead they create and manage their own
+ * conversations and agents resources.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ClientManagedResourceContext} + */ +@com.google.protobuf.Generated +public final class ClientManagedResourceContext extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + ClientManagedResourceContextOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClientManagedResourceContext"); + } + + // Use ClientManagedResourceContext.newBuilder() to construct. + private ClientManagedResourceContext(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ClientManagedResourceContext() { + conversationId_ = ""; + agentId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.class, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder.class); + } + + private int bitField0_; + public static final int INLINE_CONTEXT_FIELD_NUMBER = 1; + private com.google.cloud.geminidataanalytics.v1.Context inlineContext_; + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inlineContext field is set. + */ + @java.lang.Override + public boolean hasInlineContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inlineContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getInlineContext() { + return inlineContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : inlineContext_; + } + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder() { + return inlineContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : inlineContext_; + } + + public static final int CONVERSATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversationId_ = ""; + + /** + * + * + *
+   * Optional. The client managed conversation id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + @java.lang.Override + public java.lang.String getConversationId() { + java.lang.Object ref = conversationId_; + 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(); + conversationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The client managed conversation id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationIdBytes() { + java.lang.Object ref = conversationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentId_ = ""; + + /** + * + * + *
+   * Optional. The client managed agent id.
+   * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentId. + */ + @java.lang.Override + public java.lang.String getAgentId() { + java.lang.Object ref = agentId_; + 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(); + agentId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The client managed agent id.
+   * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentIdBytes() { + java.lang.Object ref = agentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInlineContext()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, conversationId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, agentId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInlineContext()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, conversationId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, agentId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ClientManagedResourceContext)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext other = + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) obj; + + if (hasInlineContext() != other.hasInlineContext()) return false; + if (hasInlineContext()) { + if (!getInlineContext().equals(other.getInlineContext())) return false; + } + if (!getConversationId().equals(other.getConversationId())) return false; + if (!getAgentId().equals(other.getAgentId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInlineContext()) { + hash = (37 * hash) + INLINE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getInlineContext().hashCode(); + } + hash = (37 * hash) + CONVERSATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConversationId().hashCode(); + hash = (37 * hash) + AGENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAgentId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext 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.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext 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.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ClientManagedResourceContext 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Context with client managed resources.
+   * Some clients may not use GDA managed resources including
+   * conversations and agents, instead they create and manage their own
+   * conversations and agents resources.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ClientManagedResourceContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.class, + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInlineContextFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inlineContext_ = null; + if (inlineContextBuilder_ != null) { + inlineContextBuilder_.dispose(); + inlineContextBuilder_ = null; + } + conversationId_ = ""; + agentId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext build() { + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext buildPartial() { + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext result = + new com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inlineContext_ = + inlineContextBuilder_ == null ? inlineContext_ : inlineContextBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conversationId_ = conversationId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.agentId_ = agentId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + .getDefaultInstance()) return this; + if (other.hasInlineContext()) { + mergeInlineContext(other.getInlineContext()); + } + if (!other.getConversationId().isEmpty()) { + conversationId_ = other.conversationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAgentId().isEmpty()) { + agentId_ = other.agentId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetInlineContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + conversationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + agentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.Context inlineContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + inlineContextBuilder_; + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inlineContext field is set. + */ + public boolean hasInlineContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inlineContext. + */ + public com.google.cloud.geminidataanalytics.v1.Context getInlineContext() { + if (inlineContextBuilder_ == null) { + return inlineContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : inlineContext_; + } else { + return inlineContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInlineContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (inlineContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inlineContext_ = value; + } else { + inlineContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInlineContext( + com.google.cloud.geminidataanalytics.v1.Context.Builder builderForValue) { + if (inlineContextBuilder_ == null) { + inlineContext_ = builderForValue.build(); + } else { + inlineContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInlineContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (inlineContextBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inlineContext_ != null + && inlineContext_ + != com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) { + getInlineContextBuilder().mergeFrom(value); + } else { + inlineContext_ = value; + } + } else { + inlineContextBuilder_.mergeFrom(value); + } + if (inlineContext_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInlineContext() { + bitField0_ = (bitField0_ & ~0x00000001); + inlineContext_ = null; + if (inlineContextBuilder_ != null) { + inlineContextBuilder_.dispose(); + inlineContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.Builder getInlineContextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetInlineContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder() { + if (inlineContextBuilder_ != null) { + return inlineContextBuilder_.getMessageOrBuilder(); + } else { + return inlineContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : inlineContext_; + } + } + + /** + * + * + *
+     * Required. Context for the chat request. Use this to chat without GDA API
+     * managed conversation and agent persistence by passing all context inline.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + internalGetInlineContextFieldBuilder() { + if (inlineContextBuilder_ == null) { + inlineContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder>( + getInlineContext(), getParentForChildren(), isClean()); + inlineContext_ = null; + } + return inlineContextBuilder_; + } + + private java.lang.Object conversationId_ = ""; + + /** + * + * + *
+     * Optional. The client managed conversation id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + public java.lang.String getConversationId() { + java.lang.Object ref = conversationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The client managed conversation id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + public com.google.protobuf.ByteString getConversationIdBytes() { + java.lang.Object ref = conversationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The client managed conversation id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The conversationId to set. + * @return This builder for chaining. + */ + public Builder setConversationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The client managed conversation id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConversationId() { + conversationId_ = getDefaultInstance().getConversationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The client managed conversation id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for conversationId to set. + * @return This builder for chaining. + */ + public Builder setConversationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object agentId_ = ""; + + /** + * + * + *
+     * Optional. The client managed agent id.
+     * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentId. + */ + public java.lang.String getAgentId() { + java.lang.Object ref = agentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The client managed agent id.
+     * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentId. + */ + public com.google.protobuf.ByteString getAgentIdBytes() { + java.lang.Object ref = agentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The client managed agent id.
+     * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The agentId to set. + * @return This builder for chaining. + */ + public Builder setAgentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The client managed agent id.
+     * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAgentId() { + agentId_ = getDefaultInstance().getAgentId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The client managed agent id.
+     * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for agentId to set. + * @return This builder for chaining. + */ + public Builder setAgentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + private static final com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext(); + } + + public static com.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientManagedResourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ClientManagedResourceContext + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContextOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContextOrBuilder.java new file mode 100644 index 000000000000..6fc5f721a9d2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ClientManagedResourceContextOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ClientManagedResourceContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ClientManagedResourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inlineContext field is set. + */ + boolean hasInlineContext(); + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inlineContext. + */ + com.google.cloud.geminidataanalytics.v1.Context getInlineContext(); + + /** + * + * + *
+   * Required. Context for the chat request. Use this to chat without GDA API
+   * managed conversation and agent persistence by passing all context inline.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context inline_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getInlineContextOrBuilder(); + + /** + * + * + *
+   * Optional. The client managed conversation id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + java.lang.String getConversationId(); + + /** + * + * + *
+   * Optional. The client managed conversation id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + com.google.protobuf.ByteString getConversationIdBytes(); + + /** + * + * + *
+   * Optional. The client managed agent id.
+   * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentId. + */ + java.lang.String getAgentId(); + + /** + * + * + *
+   * Optional. The client managed agent id.
+   * 
+ * + * string agent_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentId. + */ + com.google.protobuf.ByteString getAgentIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Context.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Context.java new file mode 100644 index 000000000000..2f298fe7acb4 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Context.java @@ -0,0 +1,7174 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A collection of context to apply to this conversation
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Context} + */ +@com.google.protobuf.Generated +public final class Context extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Context) + ContextOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Context"); + } + + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Context() { + systemInstruction_ = ""; + exampleQueries_ = java.util.Collections.emptyList(); + lookerGoldenQueries_ = java.util.Collections.emptyList(); + glossaryTerms_ = java.util.Collections.emptyList(); + schemaRelationships_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.class, + com.google.cloud.geminidataanalytics.v1.Context.Builder.class); + } + + public interface SchemaRelationshipOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return Whether the leftSchemaPaths field is set. + */ + boolean hasLeftSchemaPaths(); + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return The leftSchemaPaths. + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getLeftSchemaPaths(); + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getLeftSchemaPathsOrBuilder(); + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return Whether the rightSchemaPaths field is set. + */ + boolean hasRightSchemaPaths(); + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return The rightSchemaPaths. + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getRightSchemaPaths(); + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getRightSchemaPathsOrBuilder(); + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the sources. + */ + java.util.List + getSourcesList(); + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of sources. + */ + int getSourcesCount(); + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source getSources(int index); + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for sources. + */ + java.util.List getSourcesValueList(); + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of sources at the given index. + */ + int getSourcesValue(int index); + + /** + * + * + *
+     * Optional. A confidence score for the suggested relationship.
+     * Manually added edges have the highest confidence score.
+     * 
+ * + * float confidence_score = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidenceScore. + */ + float getConfidenceScore(); + } + + /** + * + * + *
+   * The relationship between two tables, including referencing and referenced
+   * columns. This is a derived context retrieved from Dataplex Dataset
+   * Insights.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Context.SchemaRelationship} + */ + public static final class SchemaRelationship extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) + SchemaRelationshipOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaRelationship"); + } + + // Use SchemaRelationship.newBuilder() to construct. + private SchemaRelationship(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaRelationship() { + sources_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.class, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder.class); + } + + /** + * + * + *
+     * Source which generated the schema relation edge.
+     * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source} + */ + public enum Source implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The source of the schema relationship is unspecified.
+       * 
+ * + * SOURCE_UNSPECIFIED = 0; + */ + SOURCE_UNSPECIFIED(0), + /** + * + * + *
+       * The source of the schema relationship is BigQuery job history.
+       * 
+ * + * BIGQUERY_JOB_HISTORY = 1; + */ + BIGQUERY_JOB_HISTORY(1), + /** + * + * + *
+       * The source of the schema relationship is LLM suggested.
+       * 
+ * + * LLM_SUGGESTED = 2; + */ + LLM_SUGGESTED(2), + /** + * + * + *
+       * The source of the schema relationship is BigQuery table constraints.
+       * 
+ * + * BIGQUERY_TABLE_CONSTRAINTS = 3; + */ + BIGQUERY_TABLE_CONSTRAINTS(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Source"); + } + + /** + * + * + *
+       * The source of the schema relationship is unspecified.
+       * 
+ * + * SOURCE_UNSPECIFIED = 0; + */ + public static final int SOURCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The source of the schema relationship is BigQuery job history.
+       * 
+ * + * BIGQUERY_JOB_HISTORY = 1; + */ + public static final int BIGQUERY_JOB_HISTORY_VALUE = 1; + + /** + * + * + *
+       * The source of the schema relationship is LLM suggested.
+       * 
+ * + * LLM_SUGGESTED = 2; + */ + public static final int LLM_SUGGESTED_VALUE = 2; + + /** + * + * + *
+       * The source of the schema relationship is BigQuery table constraints.
+       * 
+ * + * BIGQUERY_TABLE_CONSTRAINTS = 3; + */ + public static final int BIGQUERY_TABLE_CONSTRAINTS_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 Source 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 Source forNumber(int value) { + switch (value) { + case 0: + return SOURCE_UNSPECIFIED; + case 1: + return BIGQUERY_JOB_HISTORY; + case 2: + return LLM_SUGGESTED; + case 3: + return BIGQUERY_TABLE_CONSTRAINTS; + 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 Source findValueByNumber(int number) { + return Source.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Source[] VALUES = values(); + + public static Source 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 Source(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source) + } + + public interface SchemaPathsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The service-qualified full resource name of the table
+       * Ex:
+       * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+       * 
+ * + * string table_fqn = 1; + * + * @return The tableFqn. + */ + java.lang.String getTableFqn(); + + /** + * + * + *
+       * The service-qualified full resource name of the table
+       * Ex:
+       * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+       * 
+ * + * string table_fqn = 1; + * + * @return The bytes for tableFqn. + */ + com.google.protobuf.ByteString getTableFqnBytes(); + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @return A list containing the paths. + */ + java.util.List getPathsList(); + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @return The count of paths. + */ + int getPathsCount(); + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @param index The index of the element to return. + * @return The paths at the given index. + */ + java.lang.String getPaths(int index); + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the paths at the given index. + */ + com.google.protobuf.ByteString getPathsBytes(int index); + } + + /** + * + * + *
+     * Represents an ordered set of paths within the table schema.
+     * 
+ * + * Protobuf type {@code + * google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths} + */ + public static final class SchemaPaths extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + SchemaPathsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaPaths"); + } + + // Use SchemaPaths.newBuilder() to construct. + private SchemaPaths(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaPaths() { + tableFqn_ = ""; + paths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .class, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder.class); + } + + public static final int TABLE_FQN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableFqn_ = ""; + + /** + * + * + *
+       * The service-qualified full resource name of the table
+       * Ex:
+       * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+       * 
+ * + * string table_fqn = 1; + * + * @return The tableFqn. + */ + @java.lang.Override + public java.lang.String getTableFqn() { + java.lang.Object ref = tableFqn_; + 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(); + tableFqn_ = s; + return s; + } + } + + /** + * + * + *
+       * The service-qualified full resource name of the table
+       * Ex:
+       * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+       * 
+ * + * string table_fqn = 1; + * + * @return The bytes for tableFqn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableFqnBytes() { + java.lang.Object ref = tableFqn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableFqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATHS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList paths_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @return A list containing the paths. + */ + public com.google.protobuf.ProtocolStringList getPathsList() { + return paths_; + } + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @return The count of paths. + */ + public int getPathsCount() { + return paths_.size(); + } + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @param index The index of the element to return. + * @return The paths at the given index. + */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + + /** + * + * + *
+       * The ordered list of paths within the table schema.
+       * 
+ * + * repeated string paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the paths at the given index. + */ + public com.google.protobuf.ByteString getPathsBytes(int index) { + return paths_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableFqn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableFqn_); + } + for (int i = 0; i < paths_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, paths_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableFqn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableFqn_); + } + { + int dataSize = 0; + for (int i = 0; i < paths_.size(); i++) { + dataSize += computeStringSizeNoTag(paths_.getRaw(i)); + } + size += dataSize; + size += 1 * getPathsList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths other = + (com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) obj; + + if (!getTableFqn().equals(other.getTableFqn())) return false; + if (!getPathsList().equals(other.getPathsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TABLE_FQN_FIELD_NUMBER; + hash = (53 * hash) + getTableFqn().hashCode(); + if (getPathsCount() > 0) { + hash = (37 * hash) + PATHS_FIELD_NUMBER; + hash = (53 * hash) + getPathsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + 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.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + 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.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * Represents an ordered set of paths within the table schema.
+       * 
+ * + * Protobuf type {@code + * google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .class, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tableFqn_ = ""; + paths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + build() { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + buildPartial() { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths result = + new com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tableFqn_ = tableFqn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + paths_.makeImmutable(); + result.paths_ = paths_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths other) { + if (other + == com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance()) return this; + if (!other.getTableFqn().isEmpty()) { + tableFqn_ = other.tableFqn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.paths_.isEmpty()) { + if (paths_.isEmpty()) { + paths_ = other.paths_; + bitField0_ |= 0x00000002; + } else { + ensurePathsIsMutable(); + paths_.addAll(other.paths_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableFqn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePathsIsMutable(); + paths_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tableFqn_ = ""; + + /** + * + * + *
+         * The service-qualified full resource name of the table
+         * Ex:
+         * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+         * 
+ * + * string table_fqn = 1; + * + * @return The tableFqn. + */ + public java.lang.String getTableFqn() { + java.lang.Object ref = tableFqn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableFqn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * The service-qualified full resource name of the table
+         * Ex:
+         * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+         * 
+ * + * string table_fqn = 1; + * + * @return The bytes for tableFqn. + */ + public com.google.protobuf.ByteString getTableFqnBytes() { + java.lang.Object ref = tableFqn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableFqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * The service-qualified full resource name of the table
+         * Ex:
+         * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+         * 
+ * + * string table_fqn = 1; + * + * @param value The tableFqn to set. + * @return This builder for chaining. + */ + public Builder setTableFqn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableFqn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The service-qualified full resource name of the table
+         * Ex:
+         * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+         * 
+ * + * string table_fqn = 1; + * + * @return This builder for chaining. + */ + public Builder clearTableFqn() { + tableFqn_ = getDefaultInstance().getTableFqn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * The service-qualified full resource name of the table
+         * Ex:
+         * bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
+         * 
+ * + * string table_fqn = 1; + * + * @param value The bytes for tableFqn to set. + * @return This builder for chaining. + */ + public Builder setTableFqnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableFqn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList paths_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePathsIsMutable() { + if (!paths_.isModifiable()) { + paths_ = new com.google.protobuf.LazyStringArrayList(paths_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @return A list containing the paths. + */ + public com.google.protobuf.ProtocolStringList getPathsList() { + paths_.makeImmutable(); + return paths_; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @return The count of paths. + */ + public int getPathsCount() { + return paths_.size(); + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param index The index of the element to return. + * @return The paths at the given index. + */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the paths at the given index. + */ + public com.google.protobuf.ByteString getPathsBytes(int index) { + return paths_.getByteString(index); + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param index The index to set the value at. + * @param value The paths to set. + * @return This builder for chaining. + */ + public Builder setPaths(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param value The paths to add. + * @return This builder for chaining. + */ + public Builder addPaths(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param values The paths to add. + * @return This builder for chaining. + */ + public Builder addAllPaths(java.lang.Iterable values) { + ensurePathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, paths_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @return This builder for chaining. + */ + public Builder clearPaths() { + paths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * The ordered list of paths within the table schema.
+         * 
+ * + * repeated string paths = 2; + * + * @param value The bytes of the paths to add. + * @return This builder for chaining. + */ + public Builder addPathsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePathsIsMutable(); + paths_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths) + private static final com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPaths + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths(); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaPaths parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int LEFT_SCHEMA_PATHS_FIELD_NUMBER = 1; + private com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + leftSchemaPaths_; + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return Whether the leftSchemaPaths field is set. + */ + @java.lang.Override + public boolean hasLeftSchemaPaths() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return The leftSchemaPaths. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getLeftSchemaPaths() { + return leftSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : leftSchemaPaths_; + } + + /** + * + * + *
+     * An ordered list of fields for the join from the first table.
+     * The size of this list must be the same as `right_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `right_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getLeftSchemaPathsOrBuilder() { + return leftSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : leftSchemaPaths_; + } + + public static final int RIGHT_SCHEMA_PATHS_FIELD_NUMBER = 2; + private com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + rightSchemaPaths_; + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return Whether the rightSchemaPaths field is set. + */ + @java.lang.Override + public boolean hasRightSchemaPaths() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return The rightSchemaPaths. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getRightSchemaPaths() { + return rightSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : rightSchemaPaths_; + } + + /** + * + * + *
+     * An ordered list of fields for the join from the second table.
+     * The size of this list must be the same as `left_schema_paths`.
+     * Each field at index i in this list must correspond to a field at the same
+     * index in the `left_schema_paths` list.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getRightSchemaPathsOrBuilder() { + return rightSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : rightSchemaPaths_; + } + + public static final int SOURCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList sources_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source> + sources_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source>() { + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source + convert(int from) { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source result = + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source + .forNumber(from); + return result == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source + .UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the sources. + */ + @java.lang.Override + public java.util.List + getSourcesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source>( + sources_, sources_converter_); + } + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of sources. + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); + } + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source getSources( + int index) { + return sources_converter_.convert(sources_.getInt(index)); + } + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for sources. + */ + @java.lang.Override + public java.util.List getSourcesValueList() { + return sources_; + } + + /** + * + * + *
+     * Optional. Sources which generated the schema relation edge.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of sources at the given index. + */ + @java.lang.Override + public int getSourcesValue(int index) { + return sources_.getInt(index); + } + + private int sourcesMemoizedSerializedSize; + + public static final int CONFIDENCE_SCORE_FIELD_NUMBER = 4; + private float confidenceScore_ = 0F; + + /** + * + * + *
+     * Optional. A confidence score for the suggested relationship.
+     * Manually added edges have the highest confidence score.
+     * 
+ * + * float confidence_score = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + + 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 { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLeftSchemaPaths()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRightSchemaPaths()); + } + if (getSourcesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(sourcesMemoizedSerializedSize); + } + for (int i = 0; i < sources_.size(); i++) { + output.writeEnumNoTag(sources_.getInt(i)); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + output.writeFloat(4, confidenceScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLeftSchemaPaths()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRightSchemaPaths()); + } + { + int dataSize = 0; + for (int i = 0; i < sources_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(sources_.getInt(i)); + } + size += dataSize; + if (!getSourcesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + sourcesMemoizedSerializedSize = dataSize; + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, confidenceScore_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Context.SchemaRelationship)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship other = + (com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) obj; + + if (hasLeftSchemaPaths() != other.hasLeftSchemaPaths()) return false; + if (hasLeftSchemaPaths()) { + if (!getLeftSchemaPaths().equals(other.getLeftSchemaPaths())) return false; + } + if (hasRightSchemaPaths() != other.hasRightSchemaPaths()) return false; + if (hasRightSchemaPaths()) { + if (!getRightSchemaPaths().equals(other.getRightSchemaPaths())) return false; + } + if (!sources_.equals(other.sources_)) return false; + if (java.lang.Float.floatToIntBits(getConfidenceScore()) + != java.lang.Float.floatToIntBits(other.getConfidenceScore())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLeftSchemaPaths()) { + hash = (37 * hash) + LEFT_SCHEMA_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getLeftSchemaPaths().hashCode(); + } + if (hasRightSchemaPaths()) { + hash = (37 * hash) + RIGHT_SCHEMA_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getRightSchemaPaths().hashCode(); + } + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + sources_.hashCode(); + } + hash = (37 * hash) + CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceScore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship 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.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship 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.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Context.SchemaRelationship 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The relationship between two tables, including referencing and referenced
+     * columns. This is a derived context retrieved from Dataplex Dataset
+     * Insights.
+     * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Context.SchemaRelationship} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.class, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLeftSchemaPathsFieldBuilder(); + internalGetRightSchemaPathsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leftSchemaPaths_ = null; + if (leftSchemaPathsBuilder_ != null) { + leftSchemaPathsBuilder_.dispose(); + leftSchemaPathsBuilder_ = null; + } + rightSchemaPaths_ = null; + if (rightSchemaPathsBuilder_ != null) { + rightSchemaPathsBuilder_.dispose(); + rightSchemaPathsBuilder_ = null; + } + sources_ = emptyIntList(); + confidenceScore_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship build() { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship buildPartial() { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship result = + new com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leftSchemaPaths_ = + leftSchemaPathsBuilder_ == null ? leftSchemaPaths_ : leftSchemaPathsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rightSchemaPaths_ = + rightSchemaPathsBuilder_ == null + ? rightSchemaPaths_ + : rightSchemaPathsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + sources_.makeImmutable(); + result.sources_ = sources_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.confidenceScore_ = confidenceScore_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship other) { + if (other + == com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .getDefaultInstance()) return this; + if (other.hasLeftSchemaPaths()) { + mergeLeftSchemaPaths(other.getLeftSchemaPaths()); + } + if (other.hasRightSchemaPaths()) { + mergeRightSchemaPaths(other.getRightSchemaPaths()); + } + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + sources_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + if (java.lang.Float.floatToRawIntBits(other.getConfidenceScore()) != 0) { + setConfidenceScore(other.getConfidenceScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetLeftSchemaPathsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetRightSchemaPathsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + int tmpRaw = input.readEnum(); + ensureSourcesIsMutable(); + sources_.addInt(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSourcesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + sources_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 26 + case 37: + { + confidenceScore_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + leftSchemaPaths_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder> + leftSchemaPathsBuilder_; + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return Whether the leftSchemaPaths field is set. + */ + public boolean hasLeftSchemaPaths() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + * + * @return The leftSchemaPaths. + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getLeftSchemaPaths() { + if (leftSchemaPathsBuilder_ == null) { + return leftSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : leftSchemaPaths_; + } else { + return leftSchemaPathsBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public Builder setLeftSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths value) { + if (leftSchemaPathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + leftSchemaPaths_ = value; + } else { + leftSchemaPathsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public Builder setLeftSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths.Builder + builderForValue) { + if (leftSchemaPathsBuilder_ == null) { + leftSchemaPaths_ = builderForValue.build(); + } else { + leftSchemaPathsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public Builder mergeLeftSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths value) { + if (leftSchemaPathsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && leftSchemaPaths_ != null + && leftSchemaPaths_ + != com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance()) { + getLeftSchemaPathsBuilder().mergeFrom(value); + } else { + leftSchemaPaths_ = value; + } + } else { + leftSchemaPathsBuilder_.mergeFrom(value); + } + if (leftSchemaPaths_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public Builder clearLeftSchemaPaths() { + bitField0_ = (bitField0_ & ~0x00000001); + leftSchemaPaths_ = null; + if (leftSchemaPathsBuilder_ != null) { + leftSchemaPathsBuilder_.dispose(); + leftSchemaPathsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths.Builder + getLeftSchemaPathsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLeftSchemaPathsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getLeftSchemaPathsOrBuilder() { + if (leftSchemaPathsBuilder_ != null) { + return leftSchemaPathsBuilder_.getMessageOrBuilder(); + } else { + return leftSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : leftSchemaPaths_; + } + } + + /** + * + * + *
+       * An ordered list of fields for the join from the first table.
+       * The size of this list must be the same as `right_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `right_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths left_schema_paths = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder> + internalGetLeftSchemaPathsFieldBuilder() { + if (leftSchemaPathsBuilder_ == null) { + leftSchemaPathsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder>( + getLeftSchemaPaths(), getParentForChildren(), isClean()); + leftSchemaPaths_ = null; + } + return leftSchemaPathsBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + rightSchemaPaths_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder> + rightSchemaPathsBuilder_; + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return Whether the rightSchemaPaths field is set. + */ + public boolean hasRightSchemaPaths() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + * + * @return The rightSchemaPaths. + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + getRightSchemaPaths() { + if (rightSchemaPathsBuilder_ == null) { + return rightSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : rightSchemaPaths_; + } else { + return rightSchemaPathsBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public Builder setRightSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths value) { + if (rightSchemaPathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rightSchemaPaths_ = value; + } else { + rightSchemaPathsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public Builder setRightSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths.Builder + builderForValue) { + if (rightSchemaPathsBuilder_ == null) { + rightSchemaPaths_ = builderForValue.build(); + } else { + rightSchemaPathsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public Builder mergeRightSchemaPaths( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths value) { + if (rightSchemaPathsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rightSchemaPaths_ != null + && rightSchemaPaths_ + != com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance()) { + getRightSchemaPathsBuilder().mergeFrom(value); + } else { + rightSchemaPaths_ = value; + } + } else { + rightSchemaPathsBuilder_.mergeFrom(value); + } + if (rightSchemaPaths_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public Builder clearRightSchemaPaths() { + bitField0_ = (bitField0_ & ~0x00000002); + rightSchemaPaths_ = null; + if (rightSchemaPathsBuilder_ != null) { + rightSchemaPathsBuilder_.dispose(); + rightSchemaPathsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths.Builder + getRightSchemaPathsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRightSchemaPathsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPathsOrBuilder + getRightSchemaPathsOrBuilder() { + if (rightSchemaPathsBuilder_ != null) { + return rightSchemaPathsBuilder_.getMessageOrBuilder(); + } else { + return rightSchemaPaths_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .getDefaultInstance() + : rightSchemaPaths_; + } + } + + /** + * + * + *
+       * An ordered list of fields for the join from the second table.
+       * The size of this list must be the same as `left_schema_paths`.
+       * Each field at index i in this list must correspond to a field at the same
+       * index in the `left_schema_paths` list.
+       * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths right_schema_paths = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder> + internalGetRightSchemaPathsFieldBuilder() { + if (rightSchemaPathsBuilder_ == null) { + rightSchemaPathsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.SchemaPaths + .Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .SchemaPathsOrBuilder>( + getRightSchemaPaths(), getParentForChildren(), isClean()); + rightSchemaPaths_ = null; + } + return rightSchemaPathsBuilder_; + } + + private com.google.protobuf.Internal.IntList sources_ = emptyIntList(); + + private void ensureSourcesIsMutable() { + if (!sources_.isModifiable()) { + sources_ = makeMutableCopy(sources_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the sources. + */ + public java.util.List< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source> + getSourcesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source>( + sources_, sources_converter_); + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of sources. + */ + public int getSourcesCount() { + return sources_.size(); + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source getSources( + int index) { + return sources_converter_.convert(sources_.getInt(index)); + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The sources to set. + * @return This builder for chaining. + */ + public Builder setSources( + int index, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The sources to add. + * @return This builder for chaining. + */ + public Builder addSources( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The sources to add. + * @return This builder for chaining. + */ + public Builder addAllSources( + java.lang.Iterable< + ? extends + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source> + values) { + ensureSourcesIsMutable(); + for (com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source value : + values) { + sources_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSources() { + sources_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for sources. + */ + public java.util.List getSourcesValueList() { + sources_.makeImmutable(); + return sources_; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of sources at the given index. + */ + public int getSourcesValue(int index) { + return sources_.getInt(index); + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for sources to set. + * @return This builder for chaining. + */ + public Builder setSourcesValue(int index, int value) { + ensureSourcesIsMutable(); + sources_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for sources to add. + * @return This builder for chaining. + */ + public Builder addSourcesValue(int value) { + ensureSourcesIsMutable(); + sources_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sources which generated the schema relation edge.
+       * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Source sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for sources to add. + * @return This builder for chaining. + */ + public Builder addAllSourcesValue(java.lang.Iterable values) { + ensureSourcesIsMutable(); + for (int value : values) { + sources_.addInt(value); + } + onChanged(); + return this; + } + + private float confidenceScore_; + + /** + * + * + *
+       * Optional. A confidence score for the suggested relationship.
+       * Manually added edges have the highest confidence score.
+       * 
+ * + * float confidence_score = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + + /** + * + * + *
+       * Optional. A confidence score for the suggested relationship.
+       * Manually added edges have the highest confidence score.
+       * 
+ * + * float confidence_score = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The confidenceScore to set. + * @return This builder for chaining. + */ + public Builder setConfidenceScore(float value) { + + confidenceScore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A confidence score for the suggested relationship.
+       * Manually added edges have the highest confidence score.
+       * 
+ * + * float confidence_score = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceScore() { + bitField0_ = (bitField0_ & ~0x00000008); + confidenceScore_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Context.SchemaRelationship) + private static final com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship(); + } + + public static com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaRelationship parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Context.SchemaRelationship + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+   * Optional. The basic entry point for data owners creating domain knowledge
+   * for Agent.
+   *
+   * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+   * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+   * can help the model understand the business context around a user question.
+   * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + @java.lang.Override + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + 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(); + systemInstruction_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The basic entry point for data owners creating domain knowledge
+   * for Agent.
+   *
+   * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+   * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+   * can help the model understand the business context around a user question.
+   * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASOURCE_REFERENCES_FIELD_NUMBER = 7; + private com.google.cloud.geminidataanalytics.v1.DatasourceReferences datasourceReferences_; + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasourceReferences field is set. + */ + @java.lang.Override + public boolean hasDatasourceReferences() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasourceReferences. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences getDatasourceReferences() { + return datasourceReferences_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance() + : datasourceReferences_; + } + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder + getDatasourceReferencesOrBuilder() { + return datasourceReferences_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance() + : datasourceReferences_; + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.ConversationOptions options_; + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions getOptions() { + return options_ == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance() + : options_; + } + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder + getOptionsOrBuilder() { + return options_ == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance() + : options_; + } + + public static final int EXAMPLE_QUERIES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List exampleQueries_; + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExampleQueriesList() { + return exampleQueries_; + } + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExampleQueriesOrBuilderList() { + return exampleQueries_; + } + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getExampleQueriesCount() { + return exampleQueries_.size(); + } + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index) { + return exampleQueries_.get(index); + } + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index) { + return exampleQueries_.get(index); + } + + public static final int LOOKER_GOLDEN_QUERIES_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List + lookerGoldenQueries_; + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getLookerGoldenQueriesList() { + return lookerGoldenQueries_; + } + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder> + getLookerGoldenQueriesOrBuilderList() { + return lookerGoldenQueries_; + } + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getLookerGoldenQueriesCount() { + return lookerGoldenQueries_.size(); + } + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery getLookerGoldenQueries( + int index) { + return lookerGoldenQueries_.get(index); + } + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder + getLookerGoldenQueriesOrBuilder(int index) { + return lookerGoldenQueries_.get(index); + } + + public static final int GLOSSARY_TERMS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List glossaryTerms_; + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGlossaryTermsList() { + return glossaryTerms_; + } + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGlossaryTermsOrBuilderList() { + return glossaryTerms_; + } + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getGlossaryTermsCount() { + return glossaryTerms_.size(); + } + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerms(int index) { + return glossaryTerms_.get(index); + } + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder getGlossaryTermsOrBuilder( + int index) { + return glossaryTerms_.get(index); + } + + public static final int SCHEMA_RELATIONSHIPS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + schemaRelationships_; + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSchemaRelationshipsList() { + return schemaRelationships_; + } + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder> + getSchemaRelationshipsOrBuilderList() { + return schemaRelationships_; + } + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSchemaRelationshipsCount() { + return schemaRelationships_.size(); + } + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship getSchemaRelationships( + int index) { + return schemaRelationships_.get(index); + } + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder + getSchemaRelationshipsOrBuilder(int index) { + return schemaRelationships_.get(index); + } + + public static final int USER_FUNCTIONS_FIELD_NUMBER = 10; + private com.google.cloud.geminidataanalytics.v1.UserFunctions userFunctions_; + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userFunctions field is set. + */ + @java.lang.Override + public boolean hasUserFunctions() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userFunctions. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserFunctions getUserFunctions() { + return userFunctions_ == null + ? com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance() + : userFunctions_; + } + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder + getUserFunctionsOrBuilder() { + return userFunctions_ == null + ? com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance() + : userFunctions_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemInstruction_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, systemInstruction_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getOptions()); + } + for (int i = 0; i < exampleQueries_.size(); i++) { + output.writeMessage(5, exampleQueries_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getDatasourceReferences()); + } + for (int i = 0; i < glossaryTerms_.size(); i++) { + output.writeMessage(8, glossaryTerms_.get(i)); + } + for (int i = 0; i < schemaRelationships_.size(); i++) { + output.writeMessage(9, schemaRelationships_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getUserFunctions()); + } + for (int i = 0; i < lookerGoldenQueries_.size(); i++) { + output.writeMessage(11, lookerGoldenQueries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemInstruction_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, systemInstruction_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOptions()); + } + for (int i = 0; i < exampleQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, exampleQueries_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDatasourceReferences()); + } + for (int i = 0; i < glossaryTerms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, glossaryTerms_.get(i)); + } + for (int i = 0; i < schemaRelationships_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, schemaRelationships_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUserFunctions()); + } + for (int i = 0; i < lookerGoldenQueries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, lookerGoldenQueries_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.Context)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Context other = + (com.google.cloud.geminidataanalytics.v1.Context) obj; + + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + if (hasDatasourceReferences() != other.hasDatasourceReferences()) return false; + if (hasDatasourceReferences()) { + if (!getDatasourceReferences().equals(other.getDatasourceReferences())) return false; + } + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) return false; + } + if (!getExampleQueriesList().equals(other.getExampleQueriesList())) return false; + if (!getLookerGoldenQueriesList().equals(other.getLookerGoldenQueriesList())) return false; + if (!getGlossaryTermsList().equals(other.getGlossaryTermsList())) return false; + if (!getSchemaRelationshipsList().equals(other.getSchemaRelationshipsList())) return false; + if (hasUserFunctions() != other.hasUserFunctions()) return false; + if (hasUserFunctions()) { + if (!getUserFunctions().equals(other.getUserFunctions())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + if (hasDatasourceReferences()) { + hash = (37 * hash) + DATASOURCE_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getDatasourceReferences().hashCode(); + } + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + if (getExampleQueriesCount() > 0) { + hash = (37 * hash) + EXAMPLE_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getExampleQueriesList().hashCode(); + } + if (getLookerGoldenQueriesCount() > 0) { + hash = (37 * hash) + LOOKER_GOLDEN_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getLookerGoldenQueriesList().hashCode(); + } + if (getGlossaryTermsCount() > 0) { + hash = (37 * hash) + GLOSSARY_TERMS_FIELD_NUMBER; + hash = (53 * hash) + getGlossaryTermsList().hashCode(); + } + if (getSchemaRelationshipsCount() > 0) { + hash = (37 * hash) + SCHEMA_RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + getSchemaRelationshipsList().hashCode(); + } + if (hasUserFunctions()) { + hash = (37 * hash) + USER_FUNCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getUserFunctions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context 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.geminidataanalytics.v1.Context parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context 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.geminidataanalytics.v1.Context parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Context parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Context 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of context to apply to this conversation
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Context} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Context) + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Context.class, + com.google.cloud.geminidataanalytics.v1.Context.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Context.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDatasourceReferencesFieldBuilder(); + internalGetOptionsFieldBuilder(); + internalGetExampleQueriesFieldBuilder(); + internalGetLookerGoldenQueriesFieldBuilder(); + internalGetGlossaryTermsFieldBuilder(); + internalGetSchemaRelationshipsFieldBuilder(); + internalGetUserFunctionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + systemInstruction_ = ""; + datasourceReferences_ = null; + if (datasourceReferencesBuilder_ != null) { + datasourceReferencesBuilder_.dispose(); + datasourceReferencesBuilder_ = null; + } + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + if (exampleQueriesBuilder_ == null) { + exampleQueries_ = java.util.Collections.emptyList(); + } else { + exampleQueries_ = null; + exampleQueriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (lookerGoldenQueriesBuilder_ == null) { + lookerGoldenQueries_ = java.util.Collections.emptyList(); + } else { + lookerGoldenQueries_ = null; + lookerGoldenQueriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (glossaryTermsBuilder_ == null) { + glossaryTerms_ = java.util.Collections.emptyList(); + } else { + glossaryTerms_ = null; + glossaryTermsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (schemaRelationshipsBuilder_ == null) { + schemaRelationships_ = java.util.Collections.emptyList(); + } else { + schemaRelationships_ = null; + schemaRelationshipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + userFunctions_ = null; + if (userFunctionsBuilder_ != null) { + userFunctionsBuilder_.dispose(); + userFunctionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context build() { + com.google.cloud.geminidataanalytics.v1.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context buildPartial() { + com.google.cloud.geminidataanalytics.v1.Context result = + new com.google.cloud.geminidataanalytics.v1.Context(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.Context result) { + if (exampleQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + exampleQueries_ = java.util.Collections.unmodifiableList(exampleQueries_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.exampleQueries_ = exampleQueries_; + } else { + result.exampleQueries_ = exampleQueriesBuilder_.build(); + } + if (lookerGoldenQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + lookerGoldenQueries_ = java.util.Collections.unmodifiableList(lookerGoldenQueries_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.lookerGoldenQueries_ = lookerGoldenQueries_; + } else { + result.lookerGoldenQueries_ = lookerGoldenQueriesBuilder_.build(); + } + if (glossaryTermsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + glossaryTerms_ = java.util.Collections.unmodifiableList(glossaryTerms_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.glossaryTerms_ = glossaryTerms_; + } else { + result.glossaryTerms_ = glossaryTermsBuilder_.build(); + } + if (schemaRelationshipsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + schemaRelationships_ = java.util.Collections.unmodifiableList(schemaRelationships_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.schemaRelationships_ = schemaRelationships_; + } else { + result.schemaRelationships_ = schemaRelationshipsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Context result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.systemInstruction_ = systemInstruction_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasourceReferences_ = + datasourceReferencesBuilder_ == null + ? datasourceReferences_ + : datasourceReferencesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.userFunctions_ = + userFunctionsBuilder_ == null ? userFunctions_ : userFunctionsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Context) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Context) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Context other) { + if (other == com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) + return this; + if (!other.getSystemInstruction().isEmpty()) { + systemInstruction_ = other.systemInstruction_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDatasourceReferences()) { + mergeDatasourceReferences(other.getDatasourceReferences()); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (exampleQueriesBuilder_ == null) { + if (!other.exampleQueries_.isEmpty()) { + if (exampleQueries_.isEmpty()) { + exampleQueries_ = other.exampleQueries_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureExampleQueriesIsMutable(); + exampleQueries_.addAll(other.exampleQueries_); + } + onChanged(); + } + } else { + if (!other.exampleQueries_.isEmpty()) { + if (exampleQueriesBuilder_.isEmpty()) { + exampleQueriesBuilder_.dispose(); + exampleQueriesBuilder_ = null; + exampleQueries_ = other.exampleQueries_; + bitField0_ = (bitField0_ & ~0x00000008); + exampleQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExampleQueriesFieldBuilder() + : null; + } else { + exampleQueriesBuilder_.addAllMessages(other.exampleQueries_); + } + } + } + if (lookerGoldenQueriesBuilder_ == null) { + if (!other.lookerGoldenQueries_.isEmpty()) { + if (lookerGoldenQueries_.isEmpty()) { + lookerGoldenQueries_ = other.lookerGoldenQueries_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.addAll(other.lookerGoldenQueries_); + } + onChanged(); + } + } else { + if (!other.lookerGoldenQueries_.isEmpty()) { + if (lookerGoldenQueriesBuilder_.isEmpty()) { + lookerGoldenQueriesBuilder_.dispose(); + lookerGoldenQueriesBuilder_ = null; + lookerGoldenQueries_ = other.lookerGoldenQueries_; + bitField0_ = (bitField0_ & ~0x00000010); + lookerGoldenQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLookerGoldenQueriesFieldBuilder() + : null; + } else { + lookerGoldenQueriesBuilder_.addAllMessages(other.lookerGoldenQueries_); + } + } + } + if (glossaryTermsBuilder_ == null) { + if (!other.glossaryTerms_.isEmpty()) { + if (glossaryTerms_.isEmpty()) { + glossaryTerms_ = other.glossaryTerms_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.addAll(other.glossaryTerms_); + } + onChanged(); + } + } else { + if (!other.glossaryTerms_.isEmpty()) { + if (glossaryTermsBuilder_.isEmpty()) { + glossaryTermsBuilder_.dispose(); + glossaryTermsBuilder_ = null; + glossaryTerms_ = other.glossaryTerms_; + bitField0_ = (bitField0_ & ~0x00000020); + glossaryTermsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGlossaryTermsFieldBuilder() + : null; + } else { + glossaryTermsBuilder_.addAllMessages(other.glossaryTerms_); + } + } + } + if (schemaRelationshipsBuilder_ == null) { + if (!other.schemaRelationships_.isEmpty()) { + if (schemaRelationships_.isEmpty()) { + schemaRelationships_ = other.schemaRelationships_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.addAll(other.schemaRelationships_); + } + onChanged(); + } + } else { + if (!other.schemaRelationships_.isEmpty()) { + if (schemaRelationshipsBuilder_.isEmpty()) { + schemaRelationshipsBuilder_.dispose(); + schemaRelationshipsBuilder_ = null; + schemaRelationships_ = other.schemaRelationships_; + bitField0_ = (bitField0_ & ~0x00000040); + schemaRelationshipsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSchemaRelationshipsFieldBuilder() + : null; + } else { + schemaRelationshipsBuilder_.addAllMessages(other.schemaRelationships_); + } + } + } + if (other.hasUserFunctions()) { + mergeUserFunctions(other.getUserFunctions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + systemInstruction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(internalGetOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + com.google.cloud.geminidataanalytics.v1.ExampleQuery m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.parser(), + extensionRegistry); + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(m); + } else { + exampleQueriesBuilder_.addMessage(m); + } + break; + } // case 42 + case 58: + { + input.readMessage( + internalGetDatasourceReferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 58 + case 66: + { + com.google.cloud.geminidataanalytics.v1.GlossaryTerm m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.parser(), + extensionRegistry); + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.add(m); + } else { + glossaryTermsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.parser(), + extensionRegistry); + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.add(m); + } else { + schemaRelationshipsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetUserFunctionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.parser(), + extensionRegistry); + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.add(m); + } else { + lookerGoldenQueriesBuilder_.addMessage(m); + } + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+     * Optional. The basic entry point for data owners creating domain knowledge
+     * for Agent.
+     *
+     * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+     * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+     * can help the model understand the business context around a user question.
+     * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The basic entry point for data owners creating domain knowledge
+     * for Agent.
+     *
+     * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+     * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+     * can help the model understand the business context around a user question.
+     * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The basic entry point for data owners creating domain knowledge
+     * for Agent.
+     *
+     * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+     * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+     * can help the model understand the business context around a user question.
+     * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The basic entry point for data owners creating domain knowledge
+     * for Agent.
+     *
+     * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+     * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+     * can help the model understand the business context around a user question.
+     * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSystemInstruction() { + systemInstruction_ = getDefaultInstance().getSystemInstruction(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The basic entry point for data owners creating domain knowledge
+     * for Agent.
+     *
+     * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+     * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+     * can help the model understand the business context around a user question.
+     * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemInstruction_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.DatasourceReferences datasourceReferences_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceReferences, + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder> + datasourceReferencesBuilder_; + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasourceReferences field is set. + */ + public boolean hasDatasourceReferences() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasourceReferences. + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences getDatasourceReferences() { + if (datasourceReferencesBuilder_ == null) { + return datasourceReferences_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance() + : datasourceReferences_; + } else { + return datasourceReferencesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatasourceReferences( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences value) { + if (datasourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datasourceReferences_ = value; + } else { + datasourceReferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatasourceReferences( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder builderForValue) { + if (datasourceReferencesBuilder_ == null) { + datasourceReferences_ = builderForValue.build(); + } else { + datasourceReferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDatasourceReferences( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences value) { + if (datasourceReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && datasourceReferences_ != null + && datasourceReferences_ + != com.google.cloud.geminidataanalytics.v1.DatasourceReferences + .getDefaultInstance()) { + getDatasourceReferencesBuilder().mergeFrom(value); + } else { + datasourceReferences_ = value; + } + } else { + datasourceReferencesBuilder_.mergeFrom(value); + } + if (datasourceReferences_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDatasourceReferences() { + bitField0_ = (bitField0_ & ~0x00000002); + datasourceReferences_ = null; + if (datasourceReferencesBuilder_ != null) { + datasourceReferencesBuilder_.dispose(); + datasourceReferencesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder + getDatasourceReferencesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDatasourceReferencesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder + getDatasourceReferencesOrBuilder() { + if (datasourceReferencesBuilder_ != null) { + return datasourceReferencesBuilder_.getMessageOrBuilder(); + } else { + return datasourceReferences_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance() + : datasourceReferences_; + } + } + + /** + * + * + *
+     * Required. Data sources that are available for answering the question.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceReferences, + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder> + internalGetDatasourceReferencesFieldBuilder() { + if (datasourceReferencesBuilder_ == null) { + datasourceReferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceReferences, + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder>( + getDatasourceReferences(), getParentForChildren(), isClean()); + datasourceReferences_ = null; + } + return datasourceReferencesBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.ConversationOptions options_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationOptions, + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder> + optionsBuilder_; + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.geminidataanalytics.v1.ConversationOptions getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions(com.google.cloud.geminidataanalytics.v1.ConversationOptions value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + } else { + optionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOptions(com.google.cloud.geminidataanalytics.v1.ConversationOptions value) { + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && options_ != null + && options_ + != com.google.cloud.geminidataanalytics.v1.ConversationOptions + .getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); + } else { + options_ = value; + } + } else { + optionsBuilder_.mergeFrom(value); + } + if (options_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000004); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder getOptionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetOptionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance() + : options_; + } + } + + /** + * + * + *
+     * Optional. Additional options for the conversation.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationOptions, + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder> + internalGetOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ConversationOptions, + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.util.List exampleQueries_ = + java.util.Collections.emptyList(); + + private void ensureExampleQueriesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + exampleQueries_ = + new java.util.ArrayList( + exampleQueries_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + exampleQueriesBuilder_; + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesList() { + if (exampleQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(exampleQueries_); + } else { + return exampleQueriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getExampleQueriesCount() { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.size(); + } else { + return exampleQueriesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index) { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.get(index); + } else { + return exampleQueriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.set(index, value); + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.add(value); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.add(index, value); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllExampleQueries( + java.lang.Iterable values) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exampleQueries_); + onChanged(); + } else { + exampleQueriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExampleQueries() { + if (exampleQueriesBuilder_ == null) { + exampleQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + exampleQueriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeExampleQueries(int index) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.remove(index); + onChanged(); + } else { + exampleQueriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder getExampleQueriesBuilder( + int index) { + return internalGetExampleQueriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index) { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.get(index); + } else { + return exampleQueriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesOrBuilderList() { + if (exampleQueriesBuilder_ != null) { + return exampleQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exampleQueries_); + } + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder addExampleQueriesBuilder() { + return internalGetExampleQueriesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder addExampleQueriesBuilder( + int index) { + return internalGetExampleQueriesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of example queries, providing examples of relevant and
+     * commonly used SQL queries and their corresponding natural language queries
+     * optionally present. Currently only used for BigQuery data sources and
+     * databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesBuilderList() { + return internalGetExampleQueriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + internalGetExampleQueriesFieldBuilder() { + if (exampleQueriesBuilder_ == null) { + exampleQueriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder>( + exampleQueries_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + exampleQueries_ = null; + } + return exampleQueriesBuilder_; + } + + private java.util.List + lookerGoldenQueries_ = java.util.Collections.emptyList(); + + private void ensureLookerGoldenQueriesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + lookerGoldenQueries_ = + new java.util.ArrayList( + lookerGoldenQueries_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder> + lookerGoldenQueriesBuilder_; + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getLookerGoldenQueriesList() { + if (lookerGoldenQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(lookerGoldenQueries_); + } else { + return lookerGoldenQueriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getLookerGoldenQueriesCount() { + if (lookerGoldenQueriesBuilder_ == null) { + return lookerGoldenQueries_.size(); + } else { + return lookerGoldenQueriesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery getLookerGoldenQueries( + int index) { + if (lookerGoldenQueriesBuilder_ == null) { + return lookerGoldenQueries_.get(index); + } else { + return lookerGoldenQueriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerGoldenQueries( + int index, com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery value) { + if (lookerGoldenQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.set(index, value); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerGoldenQueries( + int index, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder builderForValue) { + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLookerGoldenQueries( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery value) { + if (lookerGoldenQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.add(value); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLookerGoldenQueries( + int index, com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery value) { + if (lookerGoldenQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.add(index, value); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLookerGoldenQueries( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder builderForValue) { + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.add(builderForValue.build()); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLookerGoldenQueries( + int index, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder builderForValue) { + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllLookerGoldenQueries( + java.lang.Iterable + values) { + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lookerGoldenQueries_); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLookerGoldenQueries() { + if (lookerGoldenQueriesBuilder_ == null) { + lookerGoldenQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeLookerGoldenQueries(int index) { + if (lookerGoldenQueriesBuilder_ == null) { + ensureLookerGoldenQueriesIsMutable(); + lookerGoldenQueries_.remove(index); + onChanged(); + } else { + lookerGoldenQueriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder + getLookerGoldenQueriesBuilder(int index) { + return internalGetLookerGoldenQueriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder + getLookerGoldenQueriesOrBuilder(int index) { + if (lookerGoldenQueriesBuilder_ == null) { + return lookerGoldenQueries_.get(index); + } else { + return lookerGoldenQueriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder> + getLookerGoldenQueriesOrBuilderList() { + if (lookerGoldenQueriesBuilder_ != null) { + return lookerGoldenQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(lookerGoldenQueries_); + } + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder + addLookerGoldenQueriesBuilder() { + return internalGetLookerGoldenQueriesFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder + addLookerGoldenQueriesBuilder(int index) { + return internalGetLookerGoldenQueriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of golden queries, providing examples of relevant and
+     * commonly used Looker queries and their corresponding natural language
+     * queries optionally present. Only supported for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getLookerGoldenQueriesBuilderList() { + return internalGetLookerGoldenQueriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder> + internalGetLookerGoldenQueriesFieldBuilder() { + if (lookerGoldenQueriesBuilder_ == null) { + lookerGoldenQueriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder>( + lookerGoldenQueries_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + lookerGoldenQueries_ = null; + } + return lookerGoldenQueriesBuilder_; + } + + private java.util.List glossaryTerms_ = + java.util.Collections.emptyList(); + + private void ensureGlossaryTermsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + glossaryTerms_ = + new java.util.ArrayList( + glossaryTerms_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder> + glossaryTermsBuilder_; + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGlossaryTermsList() { + if (glossaryTermsBuilder_ == null) { + return java.util.Collections.unmodifiableList(glossaryTerms_); + } else { + return glossaryTermsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getGlossaryTermsCount() { + if (glossaryTermsBuilder_ == null) { + return glossaryTerms_.size(); + } else { + return glossaryTermsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerms(int index) { + if (glossaryTermsBuilder_ == null) { + return glossaryTerms_.get(index); + } else { + return glossaryTermsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGlossaryTerms( + int index, com.google.cloud.geminidataanalytics.v1.GlossaryTerm value) { + if (glossaryTermsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlossaryTermsIsMutable(); + glossaryTerms_.set(index, value); + onChanged(); + } else { + glossaryTermsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGlossaryTerms( + int index, com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder builderForValue) { + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.set(index, builderForValue.build()); + onChanged(); + } else { + glossaryTermsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGlossaryTerms(com.google.cloud.geminidataanalytics.v1.GlossaryTerm value) { + if (glossaryTermsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlossaryTermsIsMutable(); + glossaryTerms_.add(value); + onChanged(); + } else { + glossaryTermsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGlossaryTerms( + int index, com.google.cloud.geminidataanalytics.v1.GlossaryTerm value) { + if (glossaryTermsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlossaryTermsIsMutable(); + glossaryTerms_.add(index, value); + onChanged(); + } else { + glossaryTermsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGlossaryTerms( + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder builderForValue) { + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.add(builderForValue.build()); + onChanged(); + } else { + glossaryTermsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGlossaryTerms( + int index, com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder builderForValue) { + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.add(index, builderForValue.build()); + onChanged(); + } else { + glossaryTermsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllGlossaryTerms( + java.lang.Iterable values) { + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, glossaryTerms_); + onChanged(); + } else { + glossaryTermsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGlossaryTerms() { + if (glossaryTermsBuilder_ == null) { + glossaryTerms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + glossaryTermsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeGlossaryTerms(int index) { + if (glossaryTermsBuilder_ == null) { + ensureGlossaryTermsIsMutable(); + glossaryTerms_.remove(index); + onChanged(); + } else { + glossaryTermsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder getGlossaryTermsBuilder( + int index) { + return internalGetGlossaryTermsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder getGlossaryTermsOrBuilder( + int index) { + if (glossaryTermsBuilder_ == null) { + return glossaryTerms_.get(index); + } else { + return glossaryTermsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGlossaryTermsOrBuilderList() { + if (glossaryTermsBuilder_ != null) { + return glossaryTermsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(glossaryTerms_); + } + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder addGlossaryTermsBuilder() { + return internalGetGlossaryTermsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder addGlossaryTermsBuilder( + int index) { + return internalGetGlossaryTermsFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Term definitions (currently, only user authored)
+     * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGlossaryTermsBuilderList() { + return internalGetGlossaryTermsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder> + internalGetGlossaryTermsFieldBuilder() { + if (glossaryTermsBuilder_ == null) { + glossaryTermsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.GlossaryTerm, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder, + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder>( + glossaryTerms_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + glossaryTerms_ = null; + } + return glossaryTermsBuilder_; + } + + private java.util.List + schemaRelationships_ = java.util.Collections.emptyList(); + + private void ensureSchemaRelationshipsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + schemaRelationships_ = + new java.util.ArrayList< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship>( + schemaRelationships_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder> + schemaRelationshipsBuilder_; + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSchemaRelationshipsList() { + if (schemaRelationshipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(schemaRelationships_); + } else { + return schemaRelationshipsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSchemaRelationshipsCount() { + if (schemaRelationshipsBuilder_ == null) { + return schemaRelationships_.size(); + } else { + return schemaRelationshipsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + getSchemaRelationships(int index) { + if (schemaRelationshipsBuilder_ == null) { + return schemaRelationships_.get(index); + } else { + return schemaRelationshipsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaRelationships( + int index, com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship value) { + if (schemaRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.set(index, value); + onChanged(); + } else { + schemaRelationshipsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaRelationships( + int index, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + builderForValue) { + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.set(index, builderForValue.build()); + onChanged(); + } else { + schemaRelationshipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSchemaRelationships( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship value) { + if (schemaRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.add(value); + onChanged(); + } else { + schemaRelationshipsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSchemaRelationships( + int index, com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship value) { + if (schemaRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.add(index, value); + onChanged(); + } else { + schemaRelationshipsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSchemaRelationships( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + builderForValue) { + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.add(builderForValue.build()); + onChanged(); + } else { + schemaRelationshipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSchemaRelationships( + int index, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + builderForValue) { + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.add(index, builderForValue.build()); + onChanged(); + } else { + schemaRelationshipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSchemaRelationships( + java.lang.Iterable< + ? extends com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship> + values) { + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schemaRelationships_); + onChanged(); + } else { + schemaRelationshipsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchemaRelationships() { + if (schemaRelationshipsBuilder_ == null) { + schemaRelationships_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + schemaRelationshipsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSchemaRelationships(int index) { + if (schemaRelationshipsBuilder_ == null) { + ensureSchemaRelationshipsIsMutable(); + schemaRelationships_.remove(index); + onChanged(); + } else { + schemaRelationshipsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + getSchemaRelationshipsBuilder(int index) { + return internalGetSchemaRelationshipsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder + getSchemaRelationshipsOrBuilder(int index) { + if (schemaRelationshipsBuilder_ == null) { + return schemaRelationships_.get(index); + } else { + return schemaRelationshipsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder> + getSchemaRelationshipsOrBuilderList() { + if (schemaRelationshipsBuilder_ != null) { + return schemaRelationshipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(schemaRelationships_); + } + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + addSchemaRelationshipsBuilder() { + return internalGetSchemaRelationshipsFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder + addSchemaRelationshipsBuilder(int index) { + return internalGetSchemaRelationshipsFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Relationships between table schema, including referencing and
+     * referenced columns.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder> + getSchemaRelationshipsBuilderList() { + return internalGetSchemaRelationshipsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder> + internalGetSchemaRelationshipsFieldBuilder() { + if (schemaRelationshipsBuilder_ == null) { + schemaRelationshipsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship.Builder, + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder>( + schemaRelationships_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + schemaRelationships_ = null; + } + return schemaRelationshipsBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.UserFunctions userFunctions_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserFunctions, + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder, + com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder> + userFunctionsBuilder_; + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userFunctions field is set. + */ + public boolean hasUserFunctions() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userFunctions. + */ + public com.google.cloud.geminidataanalytics.v1.UserFunctions getUserFunctions() { + if (userFunctionsBuilder_ == null) { + return userFunctions_ == null + ? com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance() + : userFunctions_; + } else { + return userFunctionsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserFunctions(com.google.cloud.geminidataanalytics.v1.UserFunctions value) { + if (userFunctionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userFunctions_ = value; + } else { + userFunctionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserFunctions( + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder builderForValue) { + if (userFunctionsBuilder_ == null) { + userFunctions_ = builderForValue.build(); + } else { + userFunctionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserFunctions(com.google.cloud.geminidataanalytics.v1.UserFunctions value) { + if (userFunctionsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && userFunctions_ != null + && userFunctions_ + != com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance()) { + getUserFunctionsBuilder().mergeFrom(value); + } else { + userFunctions_ = value; + } + } else { + userFunctionsBuilder_.mergeFrom(value); + } + if (userFunctions_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserFunctions() { + bitField0_ = (bitField0_ & ~0x00000080); + userFunctions_ = null; + if (userFunctionsBuilder_ != null) { + userFunctionsBuilder_.dispose(); + userFunctionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder getUserFunctionsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUserFunctionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder + getUserFunctionsOrBuilder() { + if (userFunctionsBuilder_ != null) { + return userFunctionsBuilder_.getMessageOrBuilder(); + } else { + return userFunctions_ == null + ? com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance() + : userFunctions_; + } + } + + /** + * + * + *
+     * Optional. A collection of user functions to be included in context.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserFunctions, + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder, + com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder> + internalGetUserFunctionsFieldBuilder() { + if (userFunctionsBuilder_ == null) { + userFunctionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserFunctions, + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder, + com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder>( + getUserFunctions(), getParentForChildren(), isClean()); + userFunctions_ = null; + } + return userFunctionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Context) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Context) + private static final com.google.cloud.geminidataanalytics.v1.Context DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Context(); + } + + public static com.google.cloud.geminidataanalytics.v1.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Context parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextOrBuilder.java new file mode 100644 index 000000000000..b0ab685e3e89 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextOrBuilder.java @@ -0,0 +1,501 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The basic entry point for data owners creating domain knowledge
+   * for Agent.
+   *
+   * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+   * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+   * can help the model understand the business context around a user question.
+   * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + java.lang.String getSystemInstruction(); + + /** + * + * + *
+   * Optional. The basic entry point for data owners creating domain knowledge
+   * for Agent.
+   *
+   * Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
+   * is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
+   * can help the model understand the business context around a user question.
+   * 
+ * + * string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + com.google.protobuf.ByteString getSystemInstructionBytes(); + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasourceReferences field is set. + */ + boolean hasDatasourceReferences(); + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasourceReferences. + */ + com.google.cloud.geminidataanalytics.v1.DatasourceReferences getDatasourceReferences(); + + /** + * + * + *
+   * Required. Data sources that are available for answering the question.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder + getDatasourceReferencesOrBuilder(); + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + com.google.cloud.geminidataanalytics.v1.ConversationOptions getOptions(); + + /** + * + * + *
+   * Optional. Additional options for the conversation.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder getOptionsOrBuilder(); + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getExampleQueriesList(); + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index); + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getExampleQueriesCount(); + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getExampleQueriesOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of example queries, providing examples of relevant and
+   * commonly used SQL queries and their corresponding natural language queries
+   * optionally present. Currently only used for BigQuery data sources and
+   * databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getLookerGoldenQueriesList(); + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery getLookerGoldenQueries(int index); + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getLookerGoldenQueriesCount(); + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getLookerGoldenQueriesOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of golden queries, providing examples of relevant and
+   * commonly used Looker queries and their corresponding natural language
+   * queries optionally present. Only supported for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerGoldenQuery looker_golden_queries = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder + getLookerGoldenQueriesOrBuilder(int index); + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getGlossaryTermsList(); + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.GlossaryTerm getGlossaryTerms(int index); + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getGlossaryTermsCount(); + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGlossaryTermsOrBuilderList(); + + /** + * + * + *
+   * Optional. Term definitions (currently, only user authored)
+   * Not supported for databases (alloydb, cloudsql, spanner) data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.GlossaryTerm glossary_terms = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder getGlossaryTermsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSchemaRelationshipsList(); + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationship getSchemaRelationships( + int index); + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSchemaRelationshipsCount(); + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder> + getSchemaRelationshipsOrBuilderList(); + + /** + * + * + *
+   * Optional. Relationships between table schema, including referencing and
+   * referenced columns.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Context.SchemaRelationship schema_relationships = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Context.SchemaRelationshipOrBuilder + getSchemaRelationshipsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userFunctions field is set. + */ + boolean hasUserFunctions(); + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userFunctions. + */ + com.google.cloud.geminidataanalytics.v1.UserFunctions getUserFunctions(); + + /** + * + * + *
+   * Optional. A collection of user functions to be included in context.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.UserFunctions user_functions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder getUserFunctionsOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextProto.java new file mode 100644 index 000000000000..e4143dc20881 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ContextProto.java @@ -0,0 +1,490 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class ContextProto extends com.google.protobuf.GeneratedFile { + private ContextProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ContextProto"); + } + + 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_geminidataanalytics_v1_Context_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Context_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Citation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_CitationSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_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" + + "1google/cloud/geminidataanalytics/v1/context.proto\022#google.cloud.geminidataanal" + + "ytics.v1\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\0324google/clo" + + "ud/geminidataanalytics/v1/datasource.proto\032\036google/protobuf/wrappers.proto\"\220" + + "\t\n" + + "\007Context\022\037\n" + + "\022system_instruction\030\001 \001(\tB\003\340A\001\022]\n" + + "\025datasource_references\030\007 \001(\01329.google." + + "cloud.geminidataanalytics.v1.DatasourceReferencesB\003\340A\002\022N\n" + + "\007options\030\003 \001(\01328.google" + + ".cloud.geminidataanalytics.v1.ConversationOptionsB\003\340A\001\022O\n" + + "\017example_queries\030\005 \003(\0132" + + "1.google.cloud.geminidataanalytics.v1.ExampleQueryB\003\340A\001\022Z\n" + + "\025looker_golden_queries\030\013" + + " \003(\01326.google.cloud.geminidataanalytics.v1.LookerGoldenQueryB\003\340A\001\022N\n" + + "\016glossary_terms\030\010" + + " \003(\01321.google.cloud.geminidataanalytics.v1.GlossaryTermB\003\340A\001\022b\n" + + "\024schema_relationships\030\t \003(\0132?.google.cloud.geminid" + + "ataanalytics.v1.Context.SchemaRelationshipB\003\340A\001\022O\n" + + "\016user_functions\030\n" + + " \001(\01322.google" + + ".cloud.geminidataanalytics.v1.UserFunctionsB\003\340A\001\032\202\004\n" + + "\022SchemaRelationship\022f\n" + + "\021left_schema_paths\030\001 \001(\0132K.google.cloud.gemini" + + "dataanalytics.v1.Context.SchemaRelationship.SchemaPaths\022g\n" + + "\022right_schema_paths\030\002 \001(\0132K.google.cloud.geminidataanalytics.v" + + "1.Context.SchemaRelationship.SchemaPaths\022\\\n" + + "\007sources\030\003 \003(\0162F.google.cloud.geminid" + + "ataanalytics.v1.Context.SchemaRelationship.SourceB\003\340A\001\022\035\n" + + "\020confidence_score\030\004 \001(\002B\003\340A\001\032/\n" + + "\013SchemaPaths\022\021\n" + + "\ttable_fqn\030\001 \001(\t\022\r\n" + + "\005paths\030\002 \003(\t\"m\n" + + "\006Source\022\026\n" + + "\022SOURCE_UNSPECIFIED\020\000\022\030\n" + + "\024BIGQUERY_JOB_HISTORY\020\001\022\021\n\r" + + "LLM_SUGGESTED\020\002\022\036\n" + + "\032BIGQUERY_TABLE_CONSTRAINTS\020\003\"Z\n\r" + + "UserFunctions\022I\n" + + "\013bq_routines\030\001 " + + "\003(\01324.google.cloud.geminidataanalytics.v1.BigQueryRoutine\"\200\001\n" + + "\017BigQueryRoutine\022X\n" + + "\021routine_reference\030\001 \001(\0132=.google.cloud." + + "geminidataanalytics.v1.BigQueryRoutineReference\022\023\n" + + "\013description\030\002 \001(\t\"V\n" + + "\030BigQueryRoutineReference\022\022\n\n" + + "project_id\030\001 \001(\t\022\022\n\n" + + "dataset_id\030\002 \001(\t\022\022\n\n" + + "routine_id\030\003 \001(\t\"\247\001\n" + + "\014ExampleQuery\022\030\n" + + "\tsql_query\030e \001(\tB\003\340A\001H\000\022&\n" + + "\031natural_language_question\030\001 \001(\tB\003\340A\001\022L\n\n" + + "parameters\030\003" + + " \003(\01323.google.cloud.geminidataanalytics.v1.QueryParameterB\003\340A\001B\007\n" + + "\005query\"U\n" + + "\016QueryParameter\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022\026\n" + + "\tdata_type\030\003 \001(\tB\003\340A\002\"\263\001\n" + + "\014MatchedQuery\022H\n\r" + + "example_query\030\001" + + " \001(\01321.google.cloud.geminidataanalytics.v1.ExampleQuery\022Y\n" + + "\026query_parameter_values\030\002" + + " \003(\01329.google.cloud.geminidataanalytics.v1.QueryParameterValues\"=\n" + + "\024QueryParameterValues\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\022\n" + + "\005value\030\002 \001(\tB\003\340A\002\"\211\001\n" + + "\021LookerGoldenQuery\022\'\n" + + "\032natural_language_questions\030\004 \003(\tB\003\340A\001\022K\n" + + "\014looker_query\030\005 \001(\01320.google.cloud.g" + + "eminidataanalytics.v1.LookerQueryB\003\340A\001\"\347\002\n" + + "\013LookerQuery\022\022\n" + + "\005model\030\001 \001(\tB\003\340A\002\022\024\n" + + "\007explore\030\002 \001(\tB\003\340A\002\022\023\n" + + "\006fields\030\003 \003(\tB\003\340A\001\022M\n" + + "\007filters\030\004" + + " \003(\01327.google.cloud.geminidataanalytics.v1.LookerQuery.FilterB\003\340A\001\022\022\n" + + "\005sorts\030\005 \003(\tB\003\340A\001\022\027\n" + + "\005limit\030\006 \001(\tB\003\340A\001H\000\210\001\001\022\032\n" + + "\010query_id\030\n" + + " \001(\tB\003\340A\001H\001\210\001\001\022\033\n" + + "\tclient_id\030\013 \001(\tB\003\340A\001H\002\210\001\001\032?\n" + + "\006Filter\022\022\n" + + "\005field\030\001 \001(\tB\003\340A\002\022\027\n" + + "\005value\030\002 \001(\tB\003\340A\001H\000\210\001\001B\010\n" + + "\006_valueB\010\n" + + "\006_limitB\013\n" + + "\t_query_idB\014\n\n" + + "_client_id\"X\n" + + "\014GlossaryTerm\022\031\n" + + "\014display_name\030\001 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\002\022\023\n" + + "\006labels\030\003 \003(\tB\003\340A\001\"\313\002\n" + + "\023ConversationOptions\022K\n" + + "\010analysis\030\002" + + " \001(\01324.google.cloud.geminidataanalytics.v1.AnalysisOptionsB\003\340A\001\022O\n\n" + + "datasource\030\003" + + " \001(\01326.google.cloud.geminidataanalytics.v1.DatasourceOptionsB\003\340A\001\022W\n" + + "\005model\030\006 \001(\0162>.google.cloud.geminidataanalyti" + + "cs.v1.ConversationOptions.ModelB\003\340A\001H\000\210\001\001\"3\n" + + "\005Model\022\025\n" + + "\021MODEL_UNSPECIFIED\020\000\022\023\n" + + "\017LATEST_GA_MODEL\020\001B\010\n" + + "\006_model\"Y\n" + + "\021DatasourceOptions\022D\n" + + "\032big_query_max_billed_bytes\030\001" + + " \001(\0132\033.google.protobuf.Int64ValueB\003\340A\001\"\203\001\n" + + "\017AnalysisOptions\022P\n" + + "\006python\030\001 \001(\0132;.google" + + ".cloud.geminidataanalytics.v1.AnalysisOptions.PythonB\003\340A\001\032\036\n" + + "\006Python\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\"\240\001\n" + + "\010Citation\022I\n" + + "\007sources\030\001 \003(\0132" + + "3.google.cloud.geminidataanalytics.v1.CitationSourceB\003\340A\003\022I\n" + + "\007anchors\030\002 \003(\01323.goo" + + "gle.cloud.geminidataanalytics.v1.CitationAnchorB\003\340A\003\"\372\001\n" + + "\016CitationSource\022\022\n" + + "\003uri\030\003 \001(\tB\003\340A\003H\000\022O\n\r" + + "example_query\030\004 \001(\01321.goo" + + "gle.cloud.geminidataanalytics.v1.ExampleQueryB\003\340A\003H\000\022O\n\r" + + "glossary_term\030\005 \001(\01321.go" + + "ogle.cloud.geminidataanalytics.v1.GlossaryTermB\003\340A\003H\000\022\017\n" + + "\002id\030\001 \001(\tB\003\340A\003\022\022\n" + + "\005title\030\002 \001(\tB\003\340A\003B\r\n" + + "\013source_type\"\242\002\n" + + "\016CitationAnchor\022q\n" + + "\023text_message_anchor\030\001 \001(\0132M.goog" + + "le.cloud.geminidataanalytics.v1.Citation" + + "Anchor.TextMessageCitationAnchorB\003\340A\003H\000\032\215\001\n" + + "\031TextMessageCitationAnchor\022\027\n\n" + + "part_index\030\001 \001(\005B\003\340A\003\022\037\n" + + "\022start_offset_bytes\030\002 \001(\005B\003\340A\003\022\035\n" + + "\020end_offset_bytes\030\003 \001(\005B\003\340A\003\022\027\n\n" + + "source_ids\030\004 \003(\tB\003\340A\003B\r\n" + + "\013anchor_typeB\211\002\n" + + "\'com.google.cloud.geminidataanalytics.v1B\014ContextProtoP\001ZYcloud.google.com/go/" + + "geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb\252\002#Google.C" + + "loud.GeminiDataAnalytics.V1\312\002#Google\\Clo" + + "ud\\GeminiDataAnalytics\\V1\352\002&Google::Cloud::GeminiDataAnalytics::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.geminidataanalytics.v1.DatasourceProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_Context_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor, + new java.lang.String[] { + "SystemInstruction", + "DatasourceReferences", + "Options", + "ExampleQueries", + "LookerGoldenQueries", + "GlossaryTerms", + "SchemaRelationships", + "UserFunctions", + }); + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_Context_descriptor.getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor, + new java.lang.String[] { + "LeftSchemaPaths", "RightSchemaPaths", "Sources", "ConfidenceScore", + }); + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_descriptor + .getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Context_SchemaRelationship_SchemaPaths_descriptor, + new java.lang.String[] { + "TableFqn", "Paths", + }); + internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor, + new java.lang.String[] { + "BqRoutines", + }); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutine_descriptor, + new java.lang.String[] { + "RoutineReference", "Description", + }); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_BigQueryRoutineReference_descriptor, + new java.lang.String[] { + "ProjectId", "DatasetId", "RoutineId", + }); + internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor, + new java.lang.String[] { + "SqlQuery", "NaturalLanguageQuestion", "Parameters", "Query", + }); + internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor, + new java.lang.String[] { + "Name", "Description", "DataType", + }); + internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor, + new java.lang.String[] { + "ExampleQuery", "QueryParameterValues", + }); + internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor, + new java.lang.String[] { + "Name", "Value", + }); + internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor, + new java.lang.String[] { + "NaturalLanguageQuestions", "LookerQuery", + }); + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor, + new java.lang.String[] { + "Model", "Explore", "Fields", "Filters", "Sorts", "Limit", "QueryId", "ClientId", + }); + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor.getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor, + new java.lang.String[] { + "Field", "Value", + }); + internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor, + new java.lang.String[] { + "DisplayName", "Description", "Labels", + }); + internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor, + new java.lang.String[] { + "Analysis", "Datasource", "Model", + }); + internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor, + new java.lang.String[] { + "BigQueryMaxBilledBytes", + }); + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor, + new java.lang.String[] { + "Python", + }); + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_descriptor + .getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_AnalysisOptions_Python_descriptor, + new java.lang.String[] { + "Enabled", + }); + internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_geminidataanalytics_v1_Citation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Citation_descriptor, + new java.lang.String[] { + "Sources", "Anchors", + }); + internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_geminidataanalytics_v1_CitationSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_CitationSource_descriptor, + new java.lang.String[] { + "Uri", "ExampleQuery", "GlossaryTerm", "Id", "Title", "SourceType", + }); + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor, + new java.lang.String[] { + "TextMessageAnchor", "AnchorType", + }); + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_descriptor.getNestedType( + 0); + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_CitationAnchor_TextMessageCitationAnchor_descriptor, + new java.lang.String[] { + "PartIndex", "StartOffsetBytes", "EndOffsetBytes", "SourceIds", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.geminidataanalytics.v1.DatasourceProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Conversation.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Conversation.java new file mode 100644 index 000000000000..c7263268c3af --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Conversation.java @@ -0,0 +1,2426 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for a conversation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Conversation} + */ +@com.google.protobuf.Generated +public final class Conversation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Conversation) + ConversationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Conversation"); + } + + // Use Conversation.newBuilder() to construct. + private Conversation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Conversation() { + name_ = ""; + agents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + kmsKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Conversation.class, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a conversation. Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * `{conversation_id}` is the resource id and should be 63 characters or less
+   * and must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example:
+   * `projects/1234567890/locations/global/conversations/my-conversation`.
+   *
+   * It is recommended to skip setting this field during conversation creation
+   * as it will be inferred automatically and overwritten with the
+   * {parent}/conversations/{conversation_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a conversation. Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * `{conversation_id}` is the resource id and should be 63 characters or less
+   * and must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example:
+   * `projects/1234567890/locations/global/conversations/my-conversation`.
+   *
+   * It is recommended to skip setting this field during conversation creation
+   * as it will be inferred automatically and overwritten with the
+   * {parent}/conversations/{conversation_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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 AGENTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList agents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the agents. + */ + public com.google.protobuf.ProtocolStringList getAgentsList() { + return agents_; + } + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of agents. + */ + public int getAgentsCount() { + return agents_.size(); + } + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The agents at the given index. + */ + public java.lang.String getAgents(int index) { + return agents_.get(index); + } + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the agents at the given index. + */ + public com.google.protobuf.ByteString getAgentsBytes(int index) { + return agents_.getByteString(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LAST_USED_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp lastUsedTime_; + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUsedTime field is set. + */ + @java.lang.Override + public boolean hasLastUsedTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUsedTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUsedTime() { + return lastUsedTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUsedTime_; + } + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUsedTimeOrBuilder() { + return lastUsedTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUsedTime_; + } + + public static final int LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KMS_KEY_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + @java.lang.Override + public boolean hasKmsKey() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORY_PAUSED_FIELD_NUMBER = 11; + private boolean memoryPaused_ = false; + + /** + * + * + *
+   * Optional. Whether memory is paused for this conversation.
+   * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the memoryPaused field is set. + */ + @java.lang.Override + public boolean hasMemoryPaused() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Whether memory is paused for this conversation.
+   * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryPaused. + */ + @java.lang.Override + public boolean getMemoryPaused() { + return memoryPaused_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < agents_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, agents_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getLastUsedTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, kmsKey_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(11, memoryPaused_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < agents_.size(); i++) { + dataSize += computeStringSizeNoTag(agents_.getRaw(i)); + } + size += dataSize; + size += 1 * getAgentsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastUsedTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, kmsKey_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, memoryPaused_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Conversation)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Conversation other = + (com.google.cloud.geminidataanalytics.v1.Conversation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAgentsList().equals(other.getAgentsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasLastUsedTime() != other.hasLastUsedTime()) return false; + if (hasLastUsedTime()) { + if (!getLastUsedTime().equals(other.getLastUsedTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasKmsKey() != other.hasKmsKey()) return false; + if (hasKmsKey()) { + if (!getKmsKey().equals(other.getKmsKey())) return false; + } + if (hasMemoryPaused() != other.hasMemoryPaused()) return false; + if (hasMemoryPaused()) { + if (getMemoryPaused() != other.getMemoryPaused()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getAgentsCount() > 0) { + hash = (37 * hash) + AGENTS_FIELD_NUMBER; + hash = (53 * hash) + getAgentsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasLastUsedTime()) { + hash = (37 * hash) + LAST_USED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUsedTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasKmsKey()) { + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + } + if (hasMemoryPaused()) { + hash = (37 * hash) + MEMORY_PAUSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMemoryPaused()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation 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.geminidataanalytics.v1.Conversation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation 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.geminidataanalytics.v1.Conversation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Conversation 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for a conversation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Conversation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Conversation) + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Conversation.class, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Conversation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetLastUsedTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + agents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + lastUsedTime_ = null; + if (lastUsedTimeBuilder_ != null) { + lastUsedTimeBuilder_.dispose(); + lastUsedTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + kmsKey_ = ""; + memoryPaused_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Conversation getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Conversation build() { + com.google.cloud.geminidataanalytics.v1.Conversation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Conversation buildPartial() { + com.google.cloud.geminidataanalytics.v1.Conversation result = + new com.google.cloud.geminidataanalytics.v1.Conversation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Conversation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + agents_.makeImmutable(); + result.agents_ = agents_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastUsedTime_ = + lastUsedTimeBuilder_ == null ? lastUsedTime_ : lastUsedTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.kmsKey_ = kmsKey_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.memoryPaused_ = memoryPaused_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Conversation) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Conversation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Conversation other) { + if (other == com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.agents_.isEmpty()) { + if (agents_.isEmpty()) { + agents_ = other.agents_; + bitField0_ |= 0x00000002; + } else { + ensureAgentsIsMutable(); + agents_.addAll(other.agents_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasLastUsedTime()) { + mergeLastUsedTime(other.getLastUsedTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.hasKmsKey()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasMemoryPaused()) { + setMemoryPaused(other.getMemoryPaused()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAgentsIsMutable(); + agents_.add(s); + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetLastUsedTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 74: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 74 + case 82: + { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 82 + case 88: + { + memoryPaused_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a conversation. Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * `{conversation_id}` is the resource id and should be 63 characters or less
+     * and must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example:
+     * `projects/1234567890/locations/global/conversations/my-conversation`.
+     *
+     * It is recommended to skip setting this field during conversation creation
+     * as it will be inferred automatically and overwritten with the
+     * {parent}/conversations/{conversation_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a conversation. Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * `{conversation_id}` is the resource id and should be 63 characters or less
+     * and must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example:
+     * `projects/1234567890/locations/global/conversations/my-conversation`.
+     *
+     * It is recommended to skip setting this field during conversation creation
+     * as it will be inferred automatically and overwritten with the
+     * {parent}/conversations/{conversation_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a conversation. Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * `{conversation_id}` is the resource id and should be 63 characters or less
+     * and must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example:
+     * `projects/1234567890/locations/global/conversations/my-conversation`.
+     *
+     * It is recommended to skip setting this field during conversation creation
+     * as it will be inferred automatically and overwritten with the
+     * {parent}/conversations/{conversation_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a conversation. Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * `{conversation_id}` is the resource id and should be 63 characters or less
+     * and must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example:
+     * `projects/1234567890/locations/global/conversations/my-conversation`.
+     *
+     * It is recommended to skip setting this field during conversation creation
+     * as it will be inferred automatically and overwritten with the
+     * {parent}/conversations/{conversation_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a conversation. Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * `{conversation_id}` is the resource id and should be 63 characters or less
+     * and must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example:
+     * `projects/1234567890/locations/global/conversations/my-conversation`.
+     *
+     * It is recommended to skip setting this field during conversation creation
+     * as it will be inferred automatically and overwritten with the
+     * {parent}/conversations/{conversation_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList agents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAgentsIsMutable() { + if (!agents_.isModifiable()) { + agents_ = new com.google.protobuf.LazyStringArrayList(agents_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the agents. + */ + public com.google.protobuf.ProtocolStringList getAgentsList() { + agents_.makeImmutable(); + return agents_; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of agents. + */ + public int getAgentsCount() { + return agents_.size(); + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The agents at the given index. + */ + public java.lang.String getAgents(int index) { + return agents_.get(index); + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the agents at the given index. + */ + public com.google.protobuf.ByteString getAgentsBytes(int index) { + return agents_.getByteString(index); + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The agents to set. + * @return This builder for chaining. + */ + public Builder setAgents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The agents to add. + * @return This builder for chaining. + */ + public Builder addAgents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The agents to add. + * @return This builder for chaining. + */ + public Builder addAllAgents(java.lang.Iterable values) { + ensureAgentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, agents_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAgents() { + agents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Agent(s) in the conversation.
+     * Currently, only one agent is supported. This field is repeated to allow
+     * for future support of multiple agents in a conversation.
+     * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+     * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the agents to add. + * @return This builder for chaining. + */ + public Builder addAgentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAgentsIsMutable(); + agents_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastUsedTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUsedTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUsedTime field is set. + */ + public boolean hasLastUsedTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUsedTime. + */ + public com.google.protobuf.Timestamp getLastUsedTime() { + if (lastUsedTimeBuilder_ == null) { + return lastUsedTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUsedTime_; + } else { + return lastUsedTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUsedTime(com.google.protobuf.Timestamp value) { + if (lastUsedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUsedTime_ = value; + } else { + lastUsedTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUsedTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUsedTimeBuilder_ == null) { + lastUsedTime_ = builderForValue.build(); + } else { + lastUsedTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastUsedTime(com.google.protobuf.Timestamp value) { + if (lastUsedTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastUsedTime_ != null + && lastUsedTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastUsedTimeBuilder().mergeFrom(value); + } else { + lastUsedTime_ = value; + } + } else { + lastUsedTimeBuilder_.mergeFrom(value); + } + if (lastUsedTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastUsedTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastUsedTime_ = null; + if (lastUsedTimeBuilder_ != null) { + lastUsedTimeBuilder_.dispose(); + lastUsedTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastUsedTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetLastUsedTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastUsedTimeOrBuilder() { + if (lastUsedTimeBuilder_ != null) { + return lastUsedTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUsedTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUsedTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp of the last used conversation.
+     * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastUsedTimeFieldBuilder() { + if (lastUsedTimeBuilder_ == null) { + lastUsedTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUsedTime(), getParentForChildren(), isClean()); + lastUsedTime_ = null; + } + return lastUsedTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Open-ended and user-defined labels that can be set by the client
+     * to tag a conversation (e.g. to filter conversations for specific
+     * surfaces/products).
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + public boolean hasKmsKey() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * Conversation resources. Encryption will happen at Titan layer, we will pass
+     * the KMS key to Titan.
+     *
+     * Format:
+     * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+     * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean memoryPaused_; + + /** + * + * + *
+     * Optional. Whether memory is paused for this conversation.
+     * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the memoryPaused field is set. + */ + @java.lang.Override + public boolean hasMemoryPaused() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Whether memory is paused for this conversation.
+     * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryPaused. + */ + @java.lang.Override + public boolean getMemoryPaused() { + return memoryPaused_; + } + + /** + * + * + *
+     * Optional. Whether memory is paused for this conversation.
+     * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The memoryPaused to set. + * @return This builder for chaining. + */ + public Builder setMemoryPaused(boolean value) { + + memoryPaused_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether memory is paused for this conversation.
+     * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryPaused() { + bitField0_ = (bitField0_ & ~0x00000040); + memoryPaused_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Conversation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Conversation) + private static final com.google.cloud.geminidataanalytics.v1.Conversation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Conversation(); + } + + public static com.google.cloud.geminidataanalytics.v1.Conversation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Conversation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Conversation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationName.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationName.java new file mode 100644 index 000000000000..ad7bf6c35308 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 ConversationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CONVERSATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/conversations/{conversation}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String conversation; + + @Deprecated + protected ConversationName() { + project = null; + location = null; + conversation = null; + } + + private ConversationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + conversation = Preconditions.checkNotNull(builder.getConversation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConversation() { + return conversation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConversationName of(String project, String location, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConversation(conversation) + .build(); + } + + public static String format(String project, String location, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConversation(conversation) + .build() + .toString(); + } + + public static ConversationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CONVERSATION.validatedMatch( + formattedString, "ConversationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("conversation")); + } + + 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 (ConversationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CONVERSATION.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 (conversation != null) { + fieldMapBuilder.put("conversation", conversation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CONVERSATION.instantiate( + "project", project, "location", location, "conversation", conversation); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ConversationName that = ((ConversationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.conversation, that.conversation); + } + 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(conversation); + return h; + } + + /** Builder for projects/{project}/locations/{location}/conversations/{conversation}. */ + public static class Builder { + private String project; + private String location; + private String conversation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConversation() { + return conversation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setConversation(String conversation) { + this.conversation = conversation; + return this; + } + + private Builder(ConversationName conversationName) { + this.project = conversationName.project; + this.location = conversationName.location; + this.conversation = conversationName.conversation; + } + + public ConversationName build() { + return new ConversationName(this); + } + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptions.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptions.java new file mode 100644 index 000000000000..bd5d394de991 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptions.java @@ -0,0 +1,1411 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Options for the conversation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ConversationOptions} + */ +@com.google.protobuf.Generated +public final class ConversationOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ConversationOptions) + ConversationOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConversationOptions"); + } + + // Use ConversationOptions.newBuilder() to construct. + private ConversationOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConversationOptions() { + model_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ConversationOptions.class, + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder.class); + } + + /** + * + * + *
+   * Allowed models for the agent/conversation.
+   * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.ConversationOptions.Model} + */ + public enum Model implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No model specified. The model may be set on the chat request, or the
+     * default model will be used. Currently, this is
+     * `gemini-3.0-flash-preview`.
+     * 
+ * + * MODEL_UNSPECIFIED = 0; + */ + MODEL_UNSPECIFIED(0), + /** + * + * + *
+     * Use the most up-to-date non-preview model. Currently, this is
+     * `gemini-2.5-flash`. This constrains the request level settings. The
+     * default will change to `gemini-2.5-flash`, and setting `thinking_mode`
+     * will not be supported.
+     * 
+ * + * LATEST_GA_MODEL = 1; + */ + LATEST_GA_MODEL(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Model"); + } + + /** + * + * + *
+     * No model specified. The model may be set on the chat request, or the
+     * default model will be used. Currently, this is
+     * `gemini-3.0-flash-preview`.
+     * 
+ * + * MODEL_UNSPECIFIED = 0; + */ + public static final int MODEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Use the most up-to-date non-preview model. Currently, this is
+     * `gemini-2.5-flash`. This constrains the request level settings. The
+     * default will change to `gemini-2.5-flash`, and setting `thinking_mode`
+     * will not be supported.
+     * 
+ * + * LATEST_GA_MODEL = 1; + */ + public static final int LATEST_GA_MODEL_VALUE = 1; + + 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 Model 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 Model forNumber(int value) { + switch (value) { + case 0: + return MODEL_UNSPECIFIED; + case 1: + return LATEST_GA_MODEL; + 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 Model findValueByNumber(int number) { + return Model.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Model[] VALUES = values(); + + public static Model 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 Model(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.ConversationOptions.Model) + } + + private int bitField0_; + public static final int ANALYSIS_FIELD_NUMBER = 2; + private com.google.cloud.geminidataanalytics.v1.AnalysisOptions analysis_; + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions getAnalysis() { + return analysis_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance() + : analysis_; + } + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder getAnalysisOrBuilder() { + return analysis_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance() + : analysis_; + } + + public static final int DATASOURCE_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.DatasourceOptions datasource_; + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the datasource field is set. + */ + @java.lang.Override + public boolean hasDatasource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The datasource. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions getDatasource() { + return datasource_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance() + : datasource_; + } + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder + getDatasourceOrBuilder() { + return datasource_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance() + : datasource_; + } + + public static final int MODEL_FIELD_NUMBER = 6; + private int model_ = 0; + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + @java.lang.Override + public int getModelValue() { + return model_; + } + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model getModel() { + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model result = + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model.forNumber(model_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAnalysis()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getDatasource()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeEnum(6, model_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnalysis()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDatasource()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, model_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ConversationOptions)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ConversationOptions other = + (com.google.cloud.geminidataanalytics.v1.ConversationOptions) obj; + + if (hasAnalysis() != other.hasAnalysis()) return false; + if (hasAnalysis()) { + if (!getAnalysis().equals(other.getAnalysis())) return false; + } + if (hasDatasource() != other.hasDatasource()) return false; + if (hasDatasource()) { + if (!getDatasource().equals(other.getDatasource())) return false; + } + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (model_ != other.model_) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnalysis()) { + hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysis().hashCode(); + } + if (hasDatasource()) { + hash = (37 * hash) + DATASOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDatasource().hashCode(); + } + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + model_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions 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.geminidataanalytics.v1.ConversationOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions 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.geminidataanalytics.v1.ConversationOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ConversationOptions 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Options for the conversation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ConversationOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ConversationOptions) + com.google.cloud.geminidataanalytics.v1.ConversationOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ConversationOptions.class, + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ConversationOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnalysisFieldBuilder(); + internalGetDatasourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analysis_ = null; + if (analysisBuilder_ != null) { + analysisBuilder_.dispose(); + analysisBuilder_ = null; + } + datasource_ = null; + if (datasourceBuilder_ != null) { + datasourceBuilder_.dispose(); + datasourceBuilder_ = null; + } + model_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions build() { + com.google.cloud.geminidataanalytics.v1.ConversationOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions buildPartial() { + com.google.cloud.geminidataanalytics.v1.ConversationOptions result = + new com.google.cloud.geminidataanalytics.v1.ConversationOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ConversationOptions result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.analysis_ = analysisBuilder_ == null ? analysis_ : analysisBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasource_ = datasourceBuilder_ == null ? datasource_ : datasourceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.model_ = model_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ConversationOptions) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ConversationOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ConversationOptions other) { + if (other == com.google.cloud.geminidataanalytics.v1.ConversationOptions.getDefaultInstance()) + return this; + if (other.hasAnalysis()) { + mergeAnalysis(other.getAnalysis()); + } + if (other.hasDatasource()) { + mergeDatasource(other.getDatasource()); + } + if (other.hasModel()) { + setModelValue(other.getModelValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetAnalysisFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDatasourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 48: + { + model_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.AnalysisOptions analysis_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder> + analysisBuilder_; + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the analysis field is set. + */ + public boolean hasAnalysis() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analysis. + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions getAnalysis() { + if (analysisBuilder_ == null) { + return analysis_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance() + : analysis_; + } else { + return analysisBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnalysis(com.google.cloud.geminidataanalytics.v1.AnalysisOptions value) { + if (analysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysis_ = value; + } else { + analysisBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnalysis( + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder builderForValue) { + if (analysisBuilder_ == null) { + analysis_ = builderForValue.build(); + } else { + analysisBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAnalysis(com.google.cloud.geminidataanalytics.v1.AnalysisOptions value) { + if (analysisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && analysis_ != null + && analysis_ + != com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance()) { + getAnalysisBuilder().mergeFrom(value); + } else { + analysis_ = value; + } + } else { + analysisBuilder_.mergeFrom(value); + } + if (analysis_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAnalysis() { + bitField0_ = (bitField0_ & ~0x00000001); + analysis_ = null; + if (analysisBuilder_ != null) { + analysisBuilder_.dispose(); + analysisBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder getAnalysisBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAnalysisFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder getAnalysisOrBuilder() { + if (analysisBuilder_ != null) { + return analysisBuilder_.getMessageOrBuilder(); + } else { + return analysis_ == null + ? com.google.cloud.geminidataanalytics.v1.AnalysisOptions.getDefaultInstance() + : analysis_; + } + } + + /** + * + * + *
+     * Optional. Options for analysis.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder> + internalGetAnalysisFieldBuilder() { + if (analysisBuilder_ == null) { + analysisBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisOptions, + com.google.cloud.geminidataanalytics.v1.AnalysisOptions.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder>( + getAnalysis(), getParentForChildren(), isClean()); + analysis_ = null; + } + return analysisBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.DatasourceOptions datasource_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceOptions, + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder> + datasourceBuilder_; + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the datasource field is set. + */ + public boolean hasDatasource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The datasource. + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions getDatasource() { + if (datasourceBuilder_ == null) { + return datasource_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance() + : datasource_; + } else { + return datasourceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasource(com.google.cloud.geminidataanalytics.v1.DatasourceOptions value) { + if (datasourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datasource_ = value; + } else { + datasourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasource( + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder builderForValue) { + if (datasourceBuilder_ == null) { + datasource_ = builderForValue.build(); + } else { + datasourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDatasource( + com.google.cloud.geminidataanalytics.v1.DatasourceOptions value) { + if (datasourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && datasource_ != null + && datasource_ + != com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance()) { + getDatasourceBuilder().mergeFrom(value); + } else { + datasource_ = value; + } + } else { + datasourceBuilder_.mergeFrom(value); + } + if (datasource_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatasource() { + bitField0_ = (bitField0_ & ~0x00000002); + datasource_ = null; + if (datasourceBuilder_ != null) { + datasourceBuilder_.dispose(); + datasourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder + getDatasourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDatasourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder + getDatasourceOrBuilder() { + if (datasourceBuilder_ != null) { + return datasourceBuilder_.getMessageOrBuilder(); + } else { + return datasource_ == null + ? com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance() + : datasource_; + } + } + + /** + * + * + *
+     * Optional. Options for datasources.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceOptions, + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder> + internalGetDatasourceFieldBuilder() { + if (datasourceBuilder_ == null) { + datasourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DatasourceOptions, + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder>( + getDatasource(), getParentForChildren(), isClean()); + datasource_ = null; + } + return datasourceBuilder_; + } + + private int model_ = 0; + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + @java.lang.Override + public int getModelValue() { + return model_; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for model to set. + * @return This builder for chaining. + */ + public Builder setModelValue(int value) { + model_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model getModel() { + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model result = + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model.forNumber(model_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + model_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model to use for the agent loop.
+     * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + bitField0_ = (bitField0_ & ~0x00000004); + model_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ConversationOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ConversationOptions) + private static final com.google.cloud.geminidataanalytics.v1.ConversationOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ConversationOptions(); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ConversationOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptionsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptionsOrBuilder.java new file mode 100644 index 000000000000..9ebaa6281e08 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOptionsOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ConversationOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ConversationOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the analysis field is set. + */ + boolean hasAnalysis(); + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analysis. + */ + com.google.cloud.geminidataanalytics.v1.AnalysisOptions getAnalysis(); + + /** + * + * + *
+   * Optional. Options for analysis.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.AnalysisOptions analysis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.AnalysisOptionsOrBuilder getAnalysisOrBuilder(); + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the datasource field is set. + */ + boolean hasDatasource(); + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The datasource. + */ + com.google.cloud.geminidataanalytics.v1.DatasourceOptions getDatasource(); + + /** + * + * + *
+   * Optional. Options for datasources.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DatasourceOptions datasource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder getDatasourceOrBuilder(); + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for model. + */ + int getModelValue(); + + /** + * + * + *
+   * Optional. The model to use for the agent loop.
+   * 
+ * + * + * optional .google.cloud.geminidataanalytics.v1.ConversationOptions.Model model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The model. + */ + com.google.cloud.geminidataanalytics.v1.ConversationOptions.Model getModel(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOrBuilder.java new file mode 100644 index 000000000000..4872017099c7 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationOrBuilder.java @@ -0,0 +1,388 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ConversationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Conversation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a conversation. Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * `{conversation_id}` is the resource id and should be 63 characters or less
+   * and must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example:
+   * `projects/1234567890/locations/global/conversations/my-conversation`.
+   *
+   * It is recommended to skip setting this field during conversation creation
+   * as it will be inferred automatically and overwritten with the
+   * {parent}/conversations/{conversation_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a conversation. Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * `{conversation_id}` is the resource id and should be 63 characters or less
+   * and must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example:
+   * `projects/1234567890/locations/global/conversations/my-conversation`.
+   *
+   * It is recommended to skip setting this field during conversation creation
+   * as it will be inferred automatically and overwritten with the
+   * {parent}/conversations/{conversation_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the agents. + */ + java.util.List getAgentsList(); + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of agents. + */ + int getAgentsCount(); + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The agents at the given index. + */ + java.lang.String getAgents(int index); + + /** + * + * + *
+   * Required. Agent(s) in the conversation.
+   * Currently, only one agent is supported. This field is repeated to allow
+   * for future support of multiple agents in a conversation.
+   * Format: `projects/{project}/locations/{location}/dataAgents/{agent}`
+   * 
+ * + * repeated string agents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the agents at the given index. + */ + com.google.protobuf.ByteString getAgentsBytes(int index); + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUsedTime field is set. + */ + boolean hasLastUsedTime(); + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUsedTime. + */ + com.google.protobuf.Timestamp getLastUsedTime(); + + /** + * + * + *
+   * Output only. Timestamp of the last used conversation.
+   * 
+ * + * + * .google.protobuf.Timestamp last_used_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastUsedTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Open-ended and user-defined labels that can be set by the client
+   * to tag a conversation (e.g. to filter conversations for specific
+   * surfaces/products).
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + boolean hasKmsKey(); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * Conversation resources. Encryption will happen at Titan layer, we will pass
+   * the KMS key to Titan.
+   *
+   * Format:
+   * projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}.
+   * 
+ * + * + * optional string kms_key = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + /** + * + * + *
+   * Optional. Whether memory is paused for this conversation.
+   * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the memoryPaused field is set. + */ + boolean hasMemoryPaused(); + + /** + * + * + *
+   * Optional. Whether memory is paused for this conversation.
+   * 
+ * + * optional bool memory_paused = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryPaused. + */ + boolean getMemoryPaused(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationProto.java new file mode 100644 index 000000000000..2f0079d99bd5 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationProto.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class ConversationProto extends com.google.protobuf.GeneratedFile { + private ConversationProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConversationProto"); + } + + 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_geminidataanalytics_v1_Conversation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Conversation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_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" + + "6google/cloud/geminidataanalytics/v1/conversation.proto\022#google.cloud.geminidat" + + "aanalytics.v1\032\037google/api/field_behavior" + + ".proto\032\033google/api/field_info.proto\032\031goo" + + "gle/api/resource.proto\032\037google/protobuf/timestamp.proto\"\306\004\n" + + "\014Conversation\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\001\340A\010\022\023\n" + + "\006agents\030\002 \003(\tB\003\340A\002\0224\n" + + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0227\n" + + "\016last_used_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022R\n" + + "\006labels\030\t \003" + + "(\0132=.google.cloud.geminidataanalytics.v1.Conversation.LabelsEntryB\003\340A\001\022?\n" + + "\007kms_key\030\n" + + " \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKeyH\000\210\001\001\022\037\n\r" + + "memory_paused\030\013 \001(\010B\003\340A\001H\001\210\001\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\230\001\352A\224\001\n" + + "/geminidataanalytics.googleapis.com/Conversation\022Dproject" + + "s/{project}/locations/{location}/conversations/{conversation}*\r" + + "conversations2\014conversationB\n\n" + + "\010_kms_keyB\020\n" + + "\016_memory_paused\"\361\001\n" + + "\031CreateConversationRequest\022G\n" + + "\006parent\030\001 \001(" + + "\tB7\340A\002\372A1\022/geminidataanalytics.googleapis.com/Conversation\022\034\n" + + "\017conversation_id\030\002 \001(\tB\003\340A\001\022L\n" + + "\014conversation\030\003 \001(\01321.go" + + "ogle.cloud.geminidataanalytics.v1.ConversationB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"_\n" + + "\026GetConversationRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/geminidataanalytics.googleapis.com/Conversation\"\251\001\n" + + "\030ListConversationsRequest\022G\n" + + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/gemi" + + "nidataanalytics.googleapis.com/Conversation\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"~\n" + + "\031ListConversationsResponse\022H\n\r" + + "conversations\030\001" + + " \003(\01321.google.cloud.geminidataanalytics.v1.Conversation\022\027\n" + + "\017next_page_token\030\002 \001(\t\"b\n" + + "\031DeleteConversationRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/geminidataanalytics.googleapis.com/ConversationB\241\003\n" + + "\'com.google.cloud.geminidataanalytics.v1B\021ConversationP" + + "rotoP\001ZYcloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;gemi" + + "nidataanalyticspb\252\002#Google.Cloud.GeminiD" + + "ataAnalytics.V1\312\002#Google\\Cloud\\GeminiDat" + + "aAnalytics\\V1\352\002&Google::Cloud::GeminiDataAnalytics::V1\352A\217\001\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/locati" + + "ons/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}*\n" + + "cryptoKeys2\tcryptoKeyb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_Conversation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor, + new java.lang.String[] { + "Name", "Agents", "CreateTime", "LastUsedTime", "Labels", "KmsKey", "MemoryPaused", + }); + internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_Conversation_descriptor.getNestedType( + 0); + internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Conversation_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor, + new java.lang.String[] { + "Parent", "ConversationId", "Conversation", "RequestId", + }); + internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor, + new java.lang.String[] { + "Conversations", "NextPageToken", + }); + internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + 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); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReference.java new file mode 100644 index 000000000000..b5e0345ae08c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReference.java @@ -0,0 +1,953 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Reference to a persisted conversation and agent context.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ConversationReference} + */ +@com.google.protobuf.Generated +public final class ConversationReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ConversationReference) + ConversationReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConversationReference"); + } + + // Use ConversationReference.newBuilder() to construct. + private ConversationReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConversationReference() { + conversation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ConversationReference.class, + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder.class); + } + + private int bitField0_; + public static final int CONVERSATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversation_ = ""; + + /** + * + * + *
+   * Required. Name of the conversation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + @java.lang.Override + public java.lang.String getConversation() { + java.lang.Object ref = conversation_; + 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(); + conversation_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the conversation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationBytes() { + java.lang.Object ref = conversation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_AGENT_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.DataAgentContext dataAgentContext_; + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgentContext field is set. + */ + @java.lang.Override + public boolean hasDataAgentContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgentContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext() { + return dataAgentContext_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance() + : dataAgentContext_; + } + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder + getDataAgentContextOrBuilder() { + return dataAgentContext_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance() + : dataAgentContext_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, conversation_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDataAgentContext()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, conversation_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataAgentContext()); + } + size += getUnknownFields().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.geminidataanalytics.v1.ConversationReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ConversationReference other = + (com.google.cloud.geminidataanalytics.v1.ConversationReference) obj; + + if (!getConversation().equals(other.getConversation())) return false; + if (hasDataAgentContext() != other.hasDataAgentContext()) return false; + if (hasDataAgentContext()) { + if (!getDataAgentContext().equals(other.getDataAgentContext())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + if (hasDataAgentContext()) { + hash = (37 * hash) + DATA_AGENT_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getDataAgentContext().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference 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.geminidataanalytics.v1.ConversationReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference 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.geminidataanalytics.v1.ConversationReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ConversationReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Reference to a persisted conversation and agent context.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ConversationReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ConversationReference) + com.google.cloud.geminidataanalytics.v1.ConversationReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ConversationReference.class, + com.google.cloud.geminidataanalytics.v1.ConversationReference.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ConversationReference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataAgentContextFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + conversation_ = ""; + dataAgentContext_ = null; + if (dataAgentContextBuilder_ != null) { + dataAgentContextBuilder_.dispose(); + dataAgentContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReference build() { + com.google.cloud.geminidataanalytics.v1.ConversationReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.ConversationReference result = + new com.google.cloud.geminidataanalytics.v1.ConversationReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ConversationReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.conversation_ = conversation_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAgentContext_ = + dataAgentContextBuilder_ == null ? dataAgentContext_ : dataAgentContextBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ConversationReference) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ConversationReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ConversationReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ConversationReference.getDefaultInstance()) + return this; + if (!other.getConversation().isEmpty()) { + conversation_ = other.conversation_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDataAgentContext()) { + mergeDataAgentContext(other.getDataAgentContext()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + conversation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetDataAgentContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object conversation_ = ""; + + /** + * + * + *
+     * Required. Name of the conversation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + public java.lang.String getConversation() { + java.lang.Object ref = conversation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the conversation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + public com.google.protobuf.ByteString getConversationBytes() { + java.lang.Object ref = conversation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the conversation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The conversation to set. + * @return This builder for chaining. + */ + public Builder setConversation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the conversation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearConversation() { + conversation_ = getDefaultInstance().getConversation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the conversation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for conversation to set. + * @return This builder for chaining. + */ + public Builder setConversationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.DataAgentContext dataAgentContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder> + dataAgentContextBuilder_; + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgentContext field is set. + */ + public boolean hasDataAgentContext() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgentContext. + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext() { + if (dataAgentContextBuilder_ == null) { + return dataAgentContext_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance() + : dataAgentContext_; + } else { + return dataAgentContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext value) { + if (dataAgentContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAgentContext_ = value; + } else { + dataAgentContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder builderForValue) { + if (dataAgentContextBuilder_ == null) { + dataAgentContext_ = builderForValue.build(); + } else { + dataAgentContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAgentContext( + com.google.cloud.geminidataanalytics.v1.DataAgentContext value) { + if (dataAgentContextBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataAgentContext_ != null + && dataAgentContext_ + != com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance()) { + getDataAgentContextBuilder().mergeFrom(value); + } else { + dataAgentContext_ = value; + } + } else { + dataAgentContextBuilder_.mergeFrom(value); + } + if (dataAgentContext_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAgentContext() { + bitField0_ = (bitField0_ & ~0x00000002); + dataAgentContext_ = null; + if (dataAgentContextBuilder_ != null) { + dataAgentContextBuilder_.dispose(); + dataAgentContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder + getDataAgentContextBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDataAgentContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder + getDataAgentContextOrBuilder() { + if (dataAgentContextBuilder_ != null) { + return dataAgentContextBuilder_.getMessageOrBuilder(); + } else { + return dataAgentContext_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance() + : dataAgentContext_; + } + } + + /** + * + * + *
+     * Required. Context for the chat request using a data agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder> + internalGetDataAgentContextFieldBuilder() { + if (dataAgentContextBuilder_ == null) { + dataAgentContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgentContext, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder>( + getDataAgentContext(), getParentForChildren(), isClean()); + dataAgentContext_ = null; + } + return dataAgentContextBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ConversationReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ConversationReference) + private static final com.google.cloud.geminidataanalytics.v1.ConversationReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ConversationReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.ConversationReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ConversationReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReferenceOrBuilder.java new file mode 100644 index 000000000000..a0a4925da4a6 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ConversationReferenceOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ConversationReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ConversationReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the conversation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + java.lang.String getConversation(); + + /** + * + * + *
+   * Required. Name of the conversation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + com.google.protobuf.ByteString getConversationBytes(); + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgentContext field is set. + */ + boolean hasDataAgentContext(); + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgentContext. + */ + com.google.cloud.geminidataanalytics.v1.DataAgentContext getDataAgentContext(); + + /** + * + * + *
+   * Required. Context for the chat request using a data agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder getDataAgentContextOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequest.java new file mode 100644 index 000000000000..f7c44624067b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequest.java @@ -0,0 +1,1381 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for creating a conversation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CreateConversationRequest} + */ +@com.google.protobuf.Generated +public final class CreateConversationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.CreateConversationRequest) + CreateConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateConversationRequest"); + } + + // Use CreateConversationRequest.newBuilder() to construct. + private CreateConversationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateConversationRequest() { + parent_ = ""; + conversationId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for CreateConversationRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * 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. Parent value for CreateConversationRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * 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 CONVERSATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversationId_ = ""; + + /** + * + * + *
+   * Optional. The conversation id of the conversation to create.
+   * Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + @java.lang.Override + public java.lang.String getConversationId() { + java.lang.Object ref = conversationId_; + 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(); + conversationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The conversation id of the conversation to create.
+   * Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationIdBytes() { + java.lang.Object ref = conversationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.Conversation conversation_; + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + @java.lang.Override + public boolean hasConversation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Conversation getConversation() { + return conversation_ == null + ? com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance() + : conversation_; + } + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder getConversationOrBuilder() { + return conversation_ == null + ? com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance() + : conversation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, conversationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getConversation()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, conversationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConversation()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.CreateConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest other = + (com.google.cloud.geminidataanalytics.v1.CreateConversationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getConversationId().equals(other.getConversationId())) return false; + if (hasConversation() != other.hasConversation()) return false; + if (hasConversation()) { + if (!getConversation().equals(other.getConversation())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CONVERSATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConversationId().hashCode(); + if (hasConversation()) { + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest 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.geminidataanalytics.v1.CreateConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest 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.geminidataanalytics.v1.CreateConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.CreateConversationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for creating a conversation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CreateConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.CreateConversationRequest) + com.google.cloud.geminidataanalytics.v1.CreateConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConversationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + conversationId_ = ""; + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateConversationRequest build() { + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateConversationRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest result = + new com.google.cloud.geminidataanalytics.v1.CreateConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conversationId_ = conversationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.conversation_ = + conversationBuilder_ == null ? conversation_ : conversationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.CreateConversationRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.CreateConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.CreateConversationRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.CreateConversationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getConversationId().isEmpty()) { + conversationId_ = other.conversationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasConversation()) { + mergeConversation(other.getConversation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + conversationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetConversationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for CreateConversationRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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. Parent value for CreateConversationRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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. Parent value for CreateConversationRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for CreateConversationRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for CreateConversationRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object conversationId_ = ""; + + /** + * + * + *
+     * Optional. The conversation id of the conversation to create.
+     * Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + public java.lang.String getConversationId() { + java.lang.Object ref = conversationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The conversation id of the conversation to create.
+     * Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + public com.google.protobuf.ByteString getConversationIdBytes() { + java.lang.Object ref = conversationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The conversation id of the conversation to create.
+     * Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The conversationId to set. + * @return This builder for chaining. + */ + public Builder setConversationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The conversation id of the conversation to create.
+     * Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConversationId() { + conversationId_ = getDefaultInstance().getConversationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The conversation id of the conversation to create.
+     * Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for conversationId to set. + * @return This builder for chaining. + */ + public Builder setConversationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Conversation conversation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder> + conversationBuilder_; + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + public boolean hasConversation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + public com.google.cloud.geminidataanalytics.v1.Conversation getConversation() { + if (conversationBuilder_ == null) { + return conversation_ == null + ? com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance() + : conversation_; + } else { + return conversationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation(com.google.cloud.geminidataanalytics.v1.Conversation value) { + if (conversationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + } else { + conversationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation( + com.google.cloud.geminidataanalytics.v1.Conversation.Builder builderForValue) { + if (conversationBuilder_ == null) { + conversation_ = builderForValue.build(); + } else { + conversationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConversation(com.google.cloud.geminidataanalytics.v1.Conversation value) { + if (conversationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && conversation_ != null + && conversation_ + != com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance()) { + getConversationBuilder().mergeFrom(value); + } else { + conversation_ = value; + } + } else { + conversationBuilder_.mergeFrom(value); + } + if (conversation_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConversation() { + bitField0_ = (bitField0_ & ~0x00000004); + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Conversation.Builder getConversationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetConversationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder + getConversationOrBuilder() { + if (conversationBuilder_ != null) { + return conversationBuilder_.getMessageOrBuilder(); + } else { + return conversation_ == null + ? com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance() + : conversation_; + } + } + + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder> + internalGetConversationFieldBuilder() { + if (conversationBuilder_ == null) { + conversationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder>( + getConversation(), getParentForChildren(), isClean()); + conversation_ = null; + } + return conversationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.CreateConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.CreateConversationRequest) + private static final com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.CreateConversationRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.CreateConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequestOrBuilder.java new file mode 100644 index 000000000000..3390d17fc13b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateConversationRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CreateConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.CreateConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for CreateConversationRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for CreateConversationRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The conversation id of the conversation to create.
+   * Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversationId. + */ + java.lang.String getConversationId(); + + /** + * + * + *
+   * Optional. The conversation id of the conversation to create.
+   * Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string conversation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversationId. + */ + com.google.protobuf.ByteString getConversationIdBytes(); + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + boolean hasConversation(); + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + com.google.cloud.geminidataanalytics.v1.Conversation getConversation(); + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Conversation conversation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder getConversationOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequest.java new file mode 100644 index 000000000000..3c7026e070ff --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequest.java @@ -0,0 +1,1425 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for creating a DataAgent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CreateDataAgentRequest} + */ +@com.google.protobuf.Generated +public final class CreateDataAgentRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) + CreateDataAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDataAgentRequest"); + } + + // Use CreateDataAgentRequest.newBuilder() to construct. + private CreateDataAgentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateDataAgentRequest() { + parent_ = ""; + dataAgentId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 DATA_AGENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataAgentId_ = ""; + + /** + * + * + *
+   * Optional. Id of the requesting object. Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataAgentId. + */ + @java.lang.Override + public java.lang.String getDataAgentId() { + java.lang.Object ref = dataAgentId_; + 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(); + dataAgentId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Id of the requesting object. Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataAgentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataAgentIdBytes() { + java.lang.Object ref = dataAgentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAgentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_AGENT_FIELD_NUMBER = 3; + private com.google.cloud.geminidataanalytics.v1.DataAgent dataAgent_; + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + @java.lang.Override + public boolean hasDataAgent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent() { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder() { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataAgentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataAgentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDataAgent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataAgentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataAgentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataAgent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.CreateDataAgentRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest other = + (com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDataAgentId().equals(other.getDataAgentId())) return false; + if (hasDataAgent() != other.hasDataAgent()) return false; + if (hasDataAgent()) { + if (!getDataAgent().equals(other.getDataAgent())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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_AGENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDataAgentId().hashCode(); + if (hasDataAgent()) { + hash = (37 * hash) + DATA_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getDataAgent().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest 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.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest 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.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.CreateDataAgentRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a DataAgent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.CreateDataAgentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataAgentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataAgentId_ = ""; + dataAgent_ = null; + if (dataAgentBuilder_ != null) { + dataAgentBuilder_.dispose(); + dataAgentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest build() { + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest result = + new com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAgentId_ = dataAgentId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataAgent_ = dataAgentBuilder_ == null ? dataAgent_ : dataAgentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataAgentId().isEmpty()) { + dataAgentId_ = other.dataAgentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDataAgent()) { + mergeDataAgent(other.getDataAgent()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataAgentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDataAgentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataAgentId_ = ""; + + /** + * + * + *
+     * Optional. Id of the requesting object. Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataAgentId. + */ + public java.lang.String getDataAgentId() { + java.lang.Object ref = dataAgentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataAgentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Id of the requesting object. Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataAgentId. + */ + public com.google.protobuf.ByteString getDataAgentIdBytes() { + java.lang.Object ref = dataAgentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAgentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Id of the requesting object. Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataAgentId to set. + * @return This builder for chaining. + */ + public Builder setDataAgentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataAgentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Id of the requesting object. Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataAgentId() { + dataAgentId_ = getDefaultInstance().getDataAgentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Id of the requesting object. Must be unique within the parent.
+     * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * If not provided, the server will auto-generate a value for the id.
+     * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataAgentId to set. + * @return This builder for chaining. + */ + public Builder setDataAgentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataAgentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.DataAgent dataAgent_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + dataAgentBuilder_; + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + public boolean hasDataAgent() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent() { + if (dataAgentBuilder_ == null) { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } else { + return dataAgentBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgent(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAgent_ = value; + } else { + dataAgentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgent( + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentBuilder_ == null) { + dataAgent_ = builderForValue.build(); + } else { + dataAgentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAgent(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataAgent_ != null + && dataAgent_ + != com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()) { + getDataAgentBuilder().mergeFrom(value); + } else { + dataAgent_ = value; + } + } else { + dataAgentBuilder_.mergeFrom(value); + } + if (dataAgent_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAgent() { + bitField0_ = (bitField0_ & ~0x00000004); + dataAgent_ = null; + if (dataAgentBuilder_ != null) { + dataAgentBuilder_.dispose(); + dataAgentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder getDataAgentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDataAgentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder() { + if (dataAgentBuilder_ != null) { + return dataAgentBuilder_.getMessageOrBuilder(); + } else { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + internalGetDataAgentFieldBuilder() { + if (dataAgentBuilder_ == null) { + dataAgentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder>( + getDataAgent(), getParentForChildren(), isClean()); + dataAgent_ = null; + } + return dataAgentBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) + private static final com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.CreateDataAgentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequestOrBuilder.java new file mode 100644 index 000000000000..a563fedd4491 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CreateDataAgentRequestOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CreateDataAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.CreateDataAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Id of the requesting object. Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataAgentId. + */ + java.lang.String getDataAgentId(); + + /** + * + * + *
+   * Optional. Id of the requesting object. Must be unique within the parent.
+   * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * If not provided, the server will auto-generate a value for the id.
+   * 
+ * + * string data_agent_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataAgentId. + */ + com.google.protobuf.ByteString getDataAgentIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + boolean hasDataAgent(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Credentials.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Credentials.java new file mode 100644 index 000000000000..8b5c08b11a41 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Credentials.java @@ -0,0 +1,795 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/credentials.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Represents different forms of credential specification.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Credentials} + */ +@com.google.protobuf.Generated +public final class Credentials extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Credentials) + CredentialsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Credentials"); + } + + // Use Credentials.newBuilder() to construct. + private Credentials(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Credentials() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_Credentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_Credentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Credentials.class, + com.google.cloud.geminidataanalytics.v1.Credentials.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OAUTH(1), + 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 OAUTH; + 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 OAUTH_FIELD_NUMBER = 1; + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return Whether the oauth field is set. + */ + @java.lang.Override + public boolean hasOauth() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return The oauth. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials getOauth() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder getOauthOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.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.geminidataanalytics.v1.OAuthCredentials) kind_); + } + getUnknownFields().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.geminidataanalytics.v1.OAuthCredentials) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Credentials)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Credentials other = + (com.google.cloud.geminidataanalytics.v1.Credentials) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getOauth().equals(other.getOauth())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + OAUTH_FIELD_NUMBER; + hash = (53 * hash) + getOauth().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials 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.geminidataanalytics.v1.Credentials parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials 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.geminidataanalytics.v1.Credentials parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Credentials 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents different forms of credential specification.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Credentials} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Credentials) + com.google.cloud.geminidataanalytics.v1.CredentialsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_Credentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_Credentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Credentials.class, + com.google.cloud.geminidataanalytics.v1.Credentials.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Credentials.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (oauthBuilder_ != null) { + oauthBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_Credentials_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Credentials getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Credentials build() { + com.google.cloud.geminidataanalytics.v1.Credentials result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Credentials buildPartial() { + com.google.cloud.geminidataanalytics.v1.Credentials result = + new com.google.cloud.geminidataanalytics.v1.Credentials(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Credentials result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.Credentials result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && oauthBuilder_ != null) { + result.kind_ = oauthBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Credentials) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Credentials) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Credentials other) { + if (other == com.google.cloud.geminidataanalytics.v1.Credentials.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case OAUTH: + { + mergeOauth(other.getOauth()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetOauthFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder> + oauthBuilder_; + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return Whether the oauth field is set. + */ + @java.lang.Override + public boolean hasOauth() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return The oauth. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials getOauth() { + if (oauthBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return oauthBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + public Builder setOauth(com.google.cloud.geminidataanalytics.v1.OAuthCredentials value) { + if (oauthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + oauthBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + public Builder setOauth( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder builderForValue) { + if (oauthBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + oauthBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + public Builder mergeOauth(com.google.cloud.geminidataanalytics.v1.OAuthCredentials value) { + if (oauthBuilder_ == null) { + if (kindCase_ == 1 + && kind_ + != com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.newBuilder( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + oauthBuilder_.mergeFrom(value); + } else { + oauthBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + public Builder clearOauth() { + if (oauthBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + oauthBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder getOauthBuilder() { + return internalGetOauthFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder getOauthOrBuilder() { + if ((kindCase_ == 1) && (oauthBuilder_ != null)) { + return oauthBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } + } + + /** + * + * + *
+     * OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder> + internalGetOauthFieldBuilder() { + if (oauthBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } + oauthBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return oauthBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Credentials) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Credentials) + private static final com.google.cloud.geminidataanalytics.v1.Credentials DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Credentials(); + } + + public static com.google.cloud.geminidataanalytics.v1.Credentials getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Credentials parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Credentials getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsOrBuilder.java new file mode 100644 index 000000000000..07708f63b418 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/credentials.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface CredentialsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Credentials) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return Whether the oauth field is set. + */ + boolean hasOauth(); + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + * + * @return The oauth. + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentials getOauth(); + + /** + * + * + *
+   * OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials oauth = 1; + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder getOauthOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.Credentials.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsProto.java new file mode 100644 index 000000000000..098ee8a2de66 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/CredentialsProto.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/credentials.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class CredentialsProto extends com.google.protobuf.GeneratedFile { + private CredentialsProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CredentialsProto"); + } + + 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_geminidataanalytics_v1_Credentials_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Credentials_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/geminidataanalytics/v1/cr" + + "edentials.proto\022#google.cloud.geminidata" + + "analytics.v1\032\037google/api/field_behavior." + + "proto\"]\n\013Credentials\022F\n\005oauth\030\001 \001(\01325.go" + + "ogle.cloud.geminidataanalytics.v1.OAuthC" + + "redentialsH\000B\006\n\004kind\"\256\002\n\020OAuthCredential" + + "s\022S\n\006secret\030\002 \001(\0132A.google.cloud.geminid" + + "ataanalytics.v1.OAuthCredentials.SecretB" + + "asedH\000\022Q\n\005token\030\003 \001(\0132@.google.cloud.gem" + + "inidataanalytics.v1.OAuthCredentials.Tok" + + "enBasedH\000\032A\n\013SecretBased\022\026\n\tclient_id\030\002 " + + "\001(\tB\003\340A\002\022\032\n\rclient_secret\030\003 \001(\tB\003\340A\002\032\'\n\n" + + "TokenBased\022\031\n\014access_token\030\001 \001(\tB\003\340A\002B\006\n" + + "\004kindB\215\002\n\'com.google.cloud.geminidataana" + + "lytics.v1B\020CredentialsProtoP\001ZYcloud.goo" + + "gle.com/go/geminidataanalytics/apiv1/gem" + + "inidataanalyticspb;geminidataanalyticspb" + + "\252\002#Google.Cloud.GeminiDataAnalytics.V1\312\002" + + "#Google\\Cloud\\GeminiDataAnalytics\\V1\352\002&G" + + "oogle::Cloud::GeminiDataAnalytics::V1b\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_Credentials_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_Credentials_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Credentials_descriptor, + new java.lang.String[] { + "Oauth", "Kind", + }); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor, + new java.lang.String[] { + "Secret", "Token", "Kind", + }); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor + .getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor, + new java.lang.String[] { + "ClientId", "ClientSecret", + }); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor + .getNestedType(1); + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor, + new java.lang.String[] { + "AccessToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgent.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgent.java new file mode 100644 index 000000000000..b9c2c802ab78 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgent.java @@ -0,0 +1,3399 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message describing a DataAgent object.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAgent} + */ +@com.google.protobuf.Generated +public final class DataAgent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataAgent) + DataAgentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAgent"); + } + + // Use DataAgent.newBuilder() to construct. + private DataAgent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataAgent() { + name_ = ""; + displayName_ = ""; + description_ = ""; + kmsKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAgent.class, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder.class); + } + + private int bitField0_; + private int typeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATA_ANALYTICS_AGENT(101), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(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 TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 101: + return DATA_ANALYTICS_AGENT; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int DATA_ANALYTICS_AGENT_FIELD_NUMBER = 101; + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return Whether the dataAnalyticsAgent field is set. + */ + @java.lang.Override + public boolean hasDataAnalyticsAgent() { + return typeCase_ == 101; + } + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return The dataAnalyticsAgent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent getDataAnalyticsAgent() { + if (typeCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_; + } + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder + getDataAnalyticsAgentOrBuilder() { + if (typeCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_; + } + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a DataAgent.
+   * Format:
+   * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+   * `{data_agent}` is the resource id and should be 63 characters or less and
+   * must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+   *
+   * It is recommended to skip setting this field during agent creation as it
+   * will be inferred automatically and overwritten with the
+   * {parent}/dataAgents/{data_agent_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a DataAgent.
+   * Format:
+   * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+   * `{data_agent}` is the resource id and should be 63 characters or less and
+   * must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+   *
+   * It is recommended to skip setting this field during agent creation as it
+   * will be inferred automatically and overwritten with the
+   * {parent}/dataAgents/{data_agent_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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 = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User friendly display name.
+   *
+   * * Must be between 1-256 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. User friendly display name.
+   *
+   * * Must be between 1-256 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the agent.
+   *
+   * * Must be between 1-1024 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Description of the agent.
+   *
+   * * Must be between 1-1024 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int PURGE_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp purgeTime_; + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + @java.lang.Override + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPurgeTime() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + public static final int KMS_KEY_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + @java.lang.Override + public boolean hasKmsKey() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(13, getPurgeTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, kmsKey_); + } + if (typeCase_ == 101) { + output.writeMessage(101, (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getPurgeTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, kmsKey_); + } + if (typeCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataAgent)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataAgent other = + (com.google.cloud.geminidataanalytics.v1.DataAgent) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (hasPurgeTime() != other.hasPurgeTime()) return false; + if (hasPurgeTime()) { + if (!getPurgeTime().equals(other.getPurgeTime())) return false; + } + if (hasKmsKey() != other.hasKmsKey()) return false; + if (hasKmsKey()) { + if (!getKmsKey().equals(other.getKmsKey())) return false; + } + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 101: + if (!getDataAnalyticsAgent().equals(other.getDataAnalyticsAgent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (hasPurgeTime()) { + hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurgeTime().hashCode(); + } + if (hasKmsKey()) { + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + } + switch (typeCase_) { + case 101: + hash = (37 * hash) + DATA_ANALYTICS_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getDataAnalyticsAgent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent 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.geminidataanalytics.v1.DataAgent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent 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.geminidataanalytics.v1.DataAgent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataAgent 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing a DataAgent object.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAgent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataAgent) + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAgent.class, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataAgent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); + internalGetPurgeTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataAnalyticsAgentBuilder_ != null) { + dataAnalyticsAgentBuilder_.clear(); + } + name_ = ""; + displayName_ = ""; + description_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + kmsKey_ = ""; + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent build() { + com.google.cloud.geminidataanalytics.v1.DataAgent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataAgent result = + new com.google.cloud.geminidataanalytics.v1.DataAgent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataAgent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.purgeTime_ = purgeTimeBuilder_ == null ? purgeTime_ : purgeTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.kmsKey_ = kmsKey_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.DataAgent result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 101 && dataAnalyticsAgentBuilder_ != null) { + result.type_ = dataAnalyticsAgentBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataAgent) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataAgent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataAgent other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (other.hasPurgeTime()) { + mergePurgeTime(other.getPurgeTime()); + } + if (other.hasKmsKey()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000200; + onChanged(); + } + switch (other.getTypeCase()) { + case DATA_ANALYTICS_AGENT: + { + mergeDataAnalyticsAgent(other.getDataAnalyticsAgent()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 98: + { + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetPurgeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 106 + case 114: + { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 114 + case 810: + { + input.readMessage( + internalGetDataAnalyticsAgentFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 101; + break; + } // case 810 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder> + dataAnalyticsAgentBuilder_; + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return Whether the dataAnalyticsAgent field is set. + */ + @java.lang.Override + public boolean hasDataAnalyticsAgent() { + return typeCase_ == 101; + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return The dataAnalyticsAgent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent getDataAnalyticsAgent() { + if (dataAnalyticsAgentBuilder_ == null) { + if (typeCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_; + } + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } else { + if (typeCase_ == 101) { + return dataAnalyticsAgentBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + public Builder setDataAnalyticsAgent( + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent value) { + if (dataAnalyticsAgentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dataAnalyticsAgentBuilder_.setMessage(value); + } + typeCase_ = 101; + return this; + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + public Builder setDataAnalyticsAgent( + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder builderForValue) { + if (dataAnalyticsAgentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dataAnalyticsAgentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 101; + return this; + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + public Builder mergeDataAnalyticsAgent( + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent value) { + if (dataAnalyticsAgentBuilder_ == null) { + if (typeCase_ == 101 + && type_ + != com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent + .getDefaultInstance()) { + type_ = + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.newBuilder( + (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 101) { + dataAnalyticsAgentBuilder_.mergeFrom(value); + } else { + dataAnalyticsAgentBuilder_.setMessage(value); + } + } + typeCase_ = 101; + return this; + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + public Builder clearDataAnalyticsAgent() { + if (dataAnalyticsAgentBuilder_ == null) { + if (typeCase_ == 101) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 101) { + typeCase_ = 0; + type_ = null; + } + dataAnalyticsAgentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder + getDataAnalyticsAgentBuilder() { + return internalGetDataAnalyticsAgentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder + getDataAnalyticsAgentOrBuilder() { + if ((typeCase_ == 101) && (dataAnalyticsAgentBuilder_ != null)) { + return dataAnalyticsAgentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 101) { + return (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_; + } + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data analytics agent.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder> + internalGetDataAnalyticsAgentFieldBuilder() { + if (dataAnalyticsAgentBuilder_ == null) { + if (!(typeCase_ == 101)) { + type_ = com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + dataAnalyticsAgentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 101; + onChanged(); + return dataAnalyticsAgentBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a DataAgent.
+     * Format:
+     * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+     * `{data_agent}` is the resource id and should be 63 characters or less and
+     * must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+     *
+     * It is recommended to skip setting this field during agent creation as it
+     * will be inferred automatically and overwritten with the
+     * {parent}/dataAgents/{data_agent_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a DataAgent.
+     * Format:
+     * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+     * `{data_agent}` is the resource id and should be 63 characters or less and
+     * must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+     *
+     * It is recommended to skip setting this field during agent creation as it
+     * will be inferred automatically and overwritten with the
+     * {parent}/dataAgents/{data_agent_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a DataAgent.
+     * Format:
+     * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+     * `{data_agent}` is the resource id and should be 63 characters or less and
+     * must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+     *
+     * It is recommended to skip setting this field during agent creation as it
+     * will be inferred automatically and overwritten with the
+     * {parent}/dataAgents/{data_agent_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a DataAgent.
+     * Format:
+     * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+     * `{data_agent}` is the resource id and should be 63 characters or less and
+     * must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+     *
+     * It is recommended to skip setting this field during agent creation as it
+     * will be inferred automatically and overwritten with the
+     * {parent}/dataAgents/{data_agent_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Identifier. The unique resource name of a DataAgent.
+     * Format:
+     * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+     * `{data_agent}` is the resource id and should be 63 characters or less and
+     * must match the format described in
+     * https://google.aip.dev/122#resource-id-segments
+     *
+     * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+     *
+     * It is recommended to skip setting this field during agent creation as it
+     * will be inferred automatically and overwritten with the
+     * {parent}/dataAgents/{data_agent_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User friendly display name.
+     *
+     * * Must be between 1-256 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     *
+     * * Must be between 1-256 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     *
+     * * Must be between 1-256 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     *
+     * * Must be between 1-256 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     *
+     * * Must be between 1-256 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the agent.
+     *
+     * * Must be between 1-1024 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the agent.
+     *
+     * * Must be between 1-1024 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the agent.
+     *
+     * * Must be between 1-1024 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the agent.
+     *
+     * * Must be between 1-1024 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the agent.
+     *
+     * * Must be between 1-1024 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Labels to help users filter related agents.
+     * For example, "sales", "business", "etl", and so on.
+     * Note labels are used only for filtering and not for policies.
+     * See the [labels
+     * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+     * for more details on label usage.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the data agent was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the data agent was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000080); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] The time the data agent was soft deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.Timestamp purgeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + purgeTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + public com.google.protobuf.Timestamp getPurgeTime() { + if (purgeTimeBuilder_ == null) { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } else { + return purgeTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purgeTime_ = value; + } else { + purgeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (purgeTimeBuilder_ == null) { + purgeTime_ = builderForValue.build(); + } else { + purgeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && purgeTime_ != null + && purgeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPurgeTimeBuilder().mergeFrom(value); + } else { + purgeTime_ = value; + } + } else { + purgeTimeBuilder_.mergeFrom(value); + } + if (purgeTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPurgeTime() { + bitField0_ = (bitField0_ & ~0x00000100); + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetPurgeTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + if (purgeTimeBuilder_ != null) { + return purgeTimeBuilder_.getMessageOrBuilder(); + } else { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp in UTC of when this data agent is considered
+     * expired. This is *always* provided on output, regardless of what was sent
+     * on input.
+     * 
+ * + * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetPurgeTimeFieldBuilder() { + if (purgeTimeBuilder_ == null) { + purgeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPurgeTime(), getParentForChildren(), isClean()); + purgeTime_ = null; + } + return purgeTimeBuilder_; + } + + private java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + public boolean hasKmsKey() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+     * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+     * as the DataAgent. The expected format is
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataAgent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataAgent) + private static final com.google.cloud.geminidataanalytics.v1.DataAgent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataAgent(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAgent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataAgent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContext.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContext.java new file mode 100644 index 000000000000..174a8b1bcd5e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContext.java @@ -0,0 +1,972 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Context for the chat request using a data agent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAgentContext} + */ +@com.google.protobuf.Generated +public final class DataAgentContext extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataAgentContext) + DataAgentContextOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAgentContext"); + } + + // Use DataAgentContext.newBuilder() to construct. + private DataAgentContext(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataAgentContext() { + dataAgent_ = ""; + contextVersion_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAgentContext.class, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder.class); + } + + /** + * + * + *
+   * List of context versions supported by DCS.
+   * There are two versions of context. This is to maintain versioning for the
+   * data agent.
+   * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion} + */ + public enum ContextVersion implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified or unrecognized.
+     * 
+ * + * CONTEXT_VERSION_UNSPECIFIED = 0; + */ + CONTEXT_VERSION_UNSPECIFIED(0), + /** + * + * + *
+     * Using this version, DCS will use the latest staging context for the
+     * data agent.
+     * 
+ * + * STAGING = 1; + */ + STAGING(1), + /** + * + * + *
+     * Using this version, DCS will use the latest published context for the
+     * data agent.
+     * 
+ * + * PUBLISHED = 2; + */ + PUBLISHED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ContextVersion"); + } + + /** + * + * + *
+     * Unspecified or unrecognized.
+     * 
+ * + * CONTEXT_VERSION_UNSPECIFIED = 0; + */ + public static final int CONTEXT_VERSION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Using this version, DCS will use the latest staging context for the
+     * data agent.
+     * 
+ * + * STAGING = 1; + */ + public static final int STAGING_VALUE = 1; + + /** + * + * + *
+     * Using this version, DCS will use the latest published context for the
+     * data agent.
+     * 
+ * + * PUBLISHED = 2; + */ + public static final int PUBLISHED_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 ContextVersion 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 ContextVersion forNumber(int value) { + switch (value) { + case 0: + return CONTEXT_VERSION_UNSPECIFIED; + case 1: + return STAGING; + case 2: + return PUBLISHED; + 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 ContextVersion findValueByNumber(int number) { + return ContextVersion.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ContextVersion[] VALUES = values(); + + public static ContextVersion 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 ContextVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion) + } + + public static final int DATA_AGENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataAgent_ = ""; + + /** + * + * + *
+   * Required. The name of the data agent resource.
+   * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataAgent. + */ + @java.lang.Override + public java.lang.String getDataAgent() { + java.lang.Object ref = dataAgent_; + 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(); + dataAgent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the data agent resource.
+   * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataAgentBytes() { + java.lang.Object ref = dataAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_VERSION_FIELD_NUMBER = 3; + private int contextVersion_ = 0; + + /** + * + * + *
+   * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextVersion. + */ + @java.lang.Override + public int getContextVersionValue() { + return contextVersion_; + } + + /** + * + * + *
+   * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextVersion. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion + getContextVersion() { + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion result = + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion.forNumber( + contextVersion_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataAgent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, dataAgent_); + } + if (contextVersion_ + != com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion + .CONTEXT_VERSION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, contextVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataAgent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dataAgent_); + } + if (contextVersion_ + != com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion + .CONTEXT_VERSION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, contextVersion_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataAgentContext)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataAgentContext other = + (com.google.cloud.geminidataanalytics.v1.DataAgentContext) obj; + + if (!getDataAgent().equals(other.getDataAgent())) return false; + if (contextVersion_ != other.contextVersion_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATA_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getDataAgent().hashCode(); + hash = (37 * hash) + CONTEXT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + contextVersion_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext 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.geminidataanalytics.v1.DataAgentContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext 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.geminidataanalytics.v1.DataAgentContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataAgentContext 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Context for the chat request using a data agent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAgentContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataAgentContext) + com.google.cloud.geminidataanalytics.v1.DataAgentContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAgentContext.class, + com.google.cloud.geminidataanalytics.v1.DataAgentContext.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataAgentContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataAgent_ = ""; + contextVersion_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext build() { + com.google.cloud.geminidataanalytics.v1.DataAgentContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataAgentContext result = + new com.google.cloud.geminidataanalytics.v1.DataAgentContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataAgentContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataAgent_ = dataAgent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.contextVersion_ = contextVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataAgentContext) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataAgentContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataAgentContext other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataAgentContext.getDefaultInstance()) + return this; + if (!other.getDataAgent().isEmpty()) { + dataAgent_ = other.dataAgent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.contextVersion_ != 0) { + setContextVersionValue(other.getContextVersionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataAgent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + contextVersion_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataAgent_ = ""; + + /** + * + * + *
+     * Required. The name of the data agent resource.
+     * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataAgent. + */ + public java.lang.String getDataAgent() { + java.lang.Object ref = dataAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the data agent resource.
+     * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataAgent. + */ + public com.google.protobuf.ByteString getDataAgentBytes() { + java.lang.Object ref = dataAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the data agent resource.
+     * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataAgent to set. + * @return This builder for chaining. + */ + public Builder setDataAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataAgent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the data agent resource.
+     * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataAgent() { + dataAgent_ = getDefaultInstance().getDataAgent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the data agent resource.
+     * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataAgent to set. + * @return This builder for chaining. + */ + public Builder setDataAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataAgent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int contextVersion_ = 0; + + /** + * + * + *
+     * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextVersion. + */ + @java.lang.Override + public int getContextVersionValue() { + return contextVersion_; + } + + /** + * + * + *
+     * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for contextVersion to set. + * @return This builder for chaining. + */ + public Builder setContextVersionValue(int value) { + contextVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextVersion. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion + getContextVersion() { + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion result = + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion.forNumber( + contextVersion_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The contextVersion to set. + * @return This builder for chaining. + */ + public Builder setContextVersion( + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + contextVersion_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearContextVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + contextVersion_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataAgentContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataAgentContext) + private static final com.google.cloud.geminidataanalytics.v1.DataAgentContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataAgentContext(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAgentContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAgentContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataAgentContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContextOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContextOrBuilder.java new file mode 100644 index 000000000000..fde0dd5215e8 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentContextOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataAgentContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataAgentContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the data agent resource.
+   * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataAgent. + */ + java.lang.String getDataAgent(); + + /** + * + * + *
+   * Required. The name of the data agent resource.
+   * 
+ * + * + * string data_agent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataAgent. + */ + com.google.protobuf.ByteString getDataAgentBytes(); + + /** + * + * + *
+   * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextVersion. + */ + int getContextVersionValue(); + + /** + * + * + *
+   * Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion context_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextVersion. + */ + com.google.cloud.geminidataanalytics.v1.DataAgentContext.ContextVersion getContextVersion(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentName.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentName.java new file mode 100644 index 000000000000..1121a95c90a5 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 DataAgentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataAgents/{data_agent}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dataAgent; + + @Deprecated + protected DataAgentName() { + project = null; + location = null; + dataAgent = null; + } + + private DataAgentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataAgent = Preconditions.checkNotNull(builder.getDataAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataAgent() { + return dataAgent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataAgentName of(String project, String location, String dataAgent) { + return newBuilder().setProject(project).setLocation(location).setDataAgent(dataAgent).build(); + } + + public static String format(String project, String location, String dataAgent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataAgent(dataAgent) + .build() + .toString(); + } + + public static DataAgentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATA_AGENT.validatedMatch( + formattedString, "DataAgentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("data_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 (DataAgentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_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 (dataAgent != null) { + fieldMapBuilder.put("data_agent", dataAgent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATA_AGENT.instantiate( + "project", project, "location", location, "data_agent", dataAgent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataAgentName that = ((DataAgentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataAgent, that.dataAgent); + } + 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(dataAgent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/dataAgents/{data_agent}. */ + public static class Builder { + private String project; + private String location; + private String dataAgent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataAgent() { + return dataAgent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataAgent(String dataAgent) { + this.dataAgent = dataAgent; + return this; + } + + private Builder(DataAgentName dataAgentName) { + this.project = dataAgentName.project; + this.location = dataAgentName.location; + this.dataAgent = dataAgentName.dataAgent; + } + + public DataAgentName build() { + return new DataAgentName(this); + } + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentOrBuilder.java new file mode 100644 index 000000000000..34ae118dcae2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentOrBuilder.java @@ -0,0 +1,491 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataAgentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataAgent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return Whether the dataAnalyticsAgent field is set. + */ + boolean hasDataAnalyticsAgent(); + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + * + * @return The dataAnalyticsAgent. + */ + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent getDataAnalyticsAgent(); + + /** + * + * + *
+   * Data analytics agent.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataAnalyticsAgent data_analytics_agent = 101; + * + */ + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder + getDataAnalyticsAgentOrBuilder(); + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a DataAgent.
+   * Format:
+   * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+   * `{data_agent}` is the resource id and should be 63 characters or less and
+   * must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+   *
+   * It is recommended to skip setting this field during agent creation as it
+   * will be inferred automatically and overwritten with the
+   * {parent}/dataAgents/{data_agent_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. Identifier. The unique resource name of a DataAgent.
+   * Format:
+   * `projects/{project}/locations/{location}/dataAgents/{data_agent_id}`
+   * `{data_agent}` is the resource id and should be 63 characters or less and
+   * must match the format described in
+   * https://google.aip.dev/122#resource-id-segments
+   *
+   * Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
+   *
+   * It is recommended to skip setting this field during agent creation as it
+   * will be inferred automatically and overwritten with the
+   * {parent}/dataAgents/{data_agent_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   *
+   * * Must be between 1-256 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   *
+   * * Must be between 1-256 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the agent.
+   *
+   * * Must be between 1-1024 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the agent.
+   *
+   * * Must be between 1-1024 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels to help users filter related agents.
+   * For example, "sales", "business", "etl", and so on.
+   * Note labels are used only for filtering and not for policies.
+   * See the [labels
+   * documentation](https://cloud.google.com/resource-manager/docs/labels-overview)
+   * for more details on label usage.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the data agent was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the data agent was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. [Output only] The time the data agent was soft deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + boolean hasPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + com.google.protobuf.Timestamp getPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp in UTC of when this data agent is considered
+   * expired. This is *always* provided on output, regardless of what was sent
+   * on input.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKey field is set. + */ + boolean hasKmsKey(); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + + /** + * + * + *
+   * Optional. Customer managed encryption key (CMEK) to use for encrypting the
+   * DataAgent resources. Cloud KMS CryptoKeys must reside in the same location
+   * as the DataAgent. The expected format is
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * + * optional string kms_key = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + com.google.cloud.geminidataanalytics.v1.DataAgent.TypeCase getTypeCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentProto.java new file mode 100644 index 000000000000..f11820875027 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentProto.java @@ -0,0 +1,146 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class DataAgentProto extends com.google.protobuf.GeneratedFile { + private DataAgentProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAgentProto"); + } + + 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_geminidataanalytics_v1_DataAgent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_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" + + "4google/cloud/geminidataanalytics/v1/data_agent.proto\022#google.cloud.geminidataa" + + "nalytics.v1\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032>google/" + + "cloud/geminidataanalytics/v1/data_analyt" + + "ics_agent.proto\032\037google/protobuf/timestamp.proto\"\350\005\n" + + "\tDataAgent\022W\n" + + "\024data_analytics_agent\030e" + + " \001(\01327.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentH\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\001\340A\010\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\004 \001(\tB\003\340A\001\022O\n" + + "\006labels\030\005 \003" + + "(\0132:.google.cloud.geminidataanalytics.v1.DataAgent.LabelsEntryB\003\340A\001\0224\n" + + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013delete_time\030\014" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0223\n\n" + + "purge_time\030\r" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022?\n" + + "\007kms_key\030\016 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKeyH\001\210\001\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\212\001\352A\206\001\n" + + ",geminidataanalytics.googleapis.com/Da" + + "taAgent\022?projects/{project}/locations/{location}/dataAgents/{data_agent}*\n" + + "dataAgents2\tdataAgentB\006\n" + + "\004typeB\n\n" + + "\010_kms_keyB\213\002\n" + + "\'com.google.cloud.geminidataanalytics.v1B" + + "\016DataAgentProtoP\001ZYcloud.google.com/go/geminidataanalytics/apiv1/geminidataanaly" + + "ticspb;geminidataanalyticspb\252\002#Google.Cl" + + "oud.GeminiDataAnalytics.V1\312\002#Google\\Clou" + + "d\\GeminiDataAnalytics\\V1\352\002&Google::Cloud::GeminiDataAnalytics::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor, + new java.lang.String[] { + "DataAnalyticsAgent", + "Name", + "DisplayName", + "Description", + "Labels", + "CreateTime", + "UpdateTime", + "DeleteTime", + "PurgeTime", + "KmsKey", + "Type", + }); + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_descriptor = + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_descriptor.getNestedType(0); + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DataAgent_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceProto.java new file mode 100644 index 000000000000..41ba471a4ea6 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAgentServiceProto.java @@ -0,0 +1,349 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class DataAgentServiceProto extends com.google.protobuf.GeneratedFile { + private DataAgentServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAgentServiceProto"); + } + + 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_geminidataanalytics_v1_ListDataAgentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_CreateDataAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_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" + + " + * Message describing a DataAnalyticsAgent object. + * + * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAnalyticsAgent} + */ +@com.google.protobuf.Generated +public final class DataAnalyticsAgent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) + DataAnalyticsAgentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAnalyticsAgent"); + } + + // Use DataAnalyticsAgent.newBuilder() to construct. + private DataAnalyticsAgent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataAnalyticsAgent() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.class, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder.class); + } + + private int bitField0_; + public static final int STAGING_CONTEXT_FIELD_NUMBER = 5; + private com.google.cloud.geminidataanalytics.v1.Context stagingContext_; + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the stagingContext field is set. + */ + @java.lang.Override + public boolean hasStagingContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stagingContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getStagingContext() { + return stagingContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : stagingContext_; + } + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getStagingContextOrBuilder() { + return stagingContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : stagingContext_; + } + + public static final int PUBLISHED_CONTEXT_FIELD_NUMBER = 6; + private com.google.cloud.geminidataanalytics.v1.Context publishedContext_; + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publishedContext field is set. + */ + @java.lang.Override + public boolean hasPublishedContext() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publishedContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getPublishedContext() { + return publishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : publishedContext_; + } + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getPublishedContextOrBuilder() { + return publishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : publishedContext_; + } + + public static final int LAST_PUBLISHED_CONTEXT_FIELD_NUMBER = 7; + private com.google.cloud.geminidataanalytics.v1.Context lastPublishedContext_; + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastPublishedContext field is set. + */ + @java.lang.Override + public boolean hasLastPublishedContext() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastPublishedContext. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Context getLastPublishedContext() { + return lastPublishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : lastPublishedContext_; + } + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder + getLastPublishedContextOrBuilder() { + return lastPublishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : lastPublishedContext_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getStagingContext()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getPublishedContext()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getLastPublishedContext()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStagingContext()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPublishedContext()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastPublishedContext()); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataAnalyticsAgent)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent other = + (com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) obj; + + if (hasStagingContext() != other.hasStagingContext()) return false; + if (hasStagingContext()) { + if (!getStagingContext().equals(other.getStagingContext())) return false; + } + if (hasPublishedContext() != other.hasPublishedContext()) return false; + if (hasPublishedContext()) { + if (!getPublishedContext().equals(other.getPublishedContext())) return false; + } + if (hasLastPublishedContext() != other.hasLastPublishedContext()) return false; + if (hasLastPublishedContext()) { + if (!getLastPublishedContext().equals(other.getLastPublishedContext())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStagingContext()) { + hash = (37 * hash) + STAGING_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getStagingContext().hashCode(); + } + if (hasPublishedContext()) { + hash = (37 * hash) + PUBLISHED_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getPublishedContext().hashCode(); + } + if (hasLastPublishedContext()) { + hash = (37 * hash) + LAST_PUBLISHED_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getLastPublishedContext().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent 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.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent 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.geminidataanalytics.v1.DataAnalyticsAgent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataAnalyticsAgent 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing a DataAnalyticsAgent object.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataAnalyticsAgent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.class, + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStagingContextFieldBuilder(); + internalGetPublishedContextFieldBuilder(); + internalGetLastPublishedContextFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stagingContext_ = null; + if (stagingContextBuilder_ != null) { + stagingContextBuilder_.dispose(); + stagingContextBuilder_ = null; + } + publishedContext_ = null; + if (publishedContextBuilder_ != null) { + publishedContextBuilder_.dispose(); + publishedContextBuilder_ = null; + } + lastPublishedContext_ = null; + if (lastPublishedContextBuilder_ != null) { + lastPublishedContextBuilder_.dispose(); + lastPublishedContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgentProto + .internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent build() { + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent result = + new com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stagingContext_ = + stagingContextBuilder_ == null ? stagingContext_ : stagingContextBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publishedContext_ = + publishedContextBuilder_ == null ? publishedContext_ : publishedContextBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastPublishedContext_ = + lastPublishedContextBuilder_ == null + ? lastPublishedContext_ + : lastPublishedContextBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent.getDefaultInstance()) + return this; + if (other.hasStagingContext()) { + mergeStagingContext(other.getStagingContext()); + } + if (other.hasPublishedContext()) { + mergePublishedContext(other.getPublishedContext()); + } + if (other.hasLastPublishedContext()) { + mergeLastPublishedContext(other.getLastPublishedContext()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: + { + input.readMessage( + internalGetStagingContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetPublishedContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetLastPublishedContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.Context stagingContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + stagingContextBuilder_; + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the stagingContext field is set. + */ + public boolean hasStagingContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stagingContext. + */ + public com.google.cloud.geminidataanalytics.v1.Context getStagingContext() { + if (stagingContextBuilder_ == null) { + return stagingContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : stagingContext_; + } else { + return stagingContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStagingContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (stagingContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stagingContext_ = value; + } else { + stagingContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStagingContext( + com.google.cloud.geminidataanalytics.v1.Context.Builder builderForValue) { + if (stagingContextBuilder_ == null) { + stagingContext_ = builderForValue.build(); + } else { + stagingContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStagingContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (stagingContextBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && stagingContext_ != null + && stagingContext_ + != com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) { + getStagingContextBuilder().mergeFrom(value); + } else { + stagingContext_ = value; + } + } else { + stagingContextBuilder_.mergeFrom(value); + } + if (stagingContext_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStagingContext() { + bitField0_ = (bitField0_ & ~0x00000001); + stagingContext_ = null; + if (stagingContextBuilder_ != null) { + stagingContextBuilder_.dispose(); + stagingContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.Builder getStagingContextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStagingContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getStagingContextOrBuilder() { + if (stagingContextBuilder_ != null) { + return stagingContextBuilder_.getMessageOrBuilder(); + } else { + return stagingContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : stagingContext_; + } + } + + /** + * + * + *
+     * Optional. The staging context for the agent.
+     * This context is used to test and validate changes before publishing.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + internalGetStagingContextFieldBuilder() { + if (stagingContextBuilder_ == null) { + stagingContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder>( + getStagingContext(), getParentForChildren(), isClean()); + stagingContext_ = null; + } + return stagingContextBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Context publishedContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + publishedContextBuilder_; + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publishedContext field is set. + */ + public boolean hasPublishedContext() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publishedContext. + */ + public com.google.cloud.geminidataanalytics.v1.Context getPublishedContext() { + if (publishedContextBuilder_ == null) { + return publishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : publishedContext_; + } else { + return publishedContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublishedContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (publishedContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publishedContext_ = value; + } else { + publishedContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublishedContext( + com.google.cloud.geminidataanalytics.v1.Context.Builder builderForValue) { + if (publishedContextBuilder_ == null) { + publishedContext_ = builderForValue.build(); + } else { + publishedContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePublishedContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (publishedContextBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && publishedContext_ != null + && publishedContext_ + != com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) { + getPublishedContextBuilder().mergeFrom(value); + } else { + publishedContext_ = value; + } + } else { + publishedContextBuilder_.mergeFrom(value); + } + if (publishedContext_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPublishedContext() { + bitField0_ = (bitField0_ & ~0x00000002); + publishedContext_ = null; + if (publishedContextBuilder_ != null) { + publishedContextBuilder_.dispose(); + publishedContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.Builder getPublishedContextBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPublishedContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getPublishedContextOrBuilder() { + if (publishedContextBuilder_ != null) { + return publishedContextBuilder_.getMessageOrBuilder(); + } else { + return publishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : publishedContext_; + } + } + + /** + * + * + *
+     * Optional. The published context for the agent.
+     * This context is used by the Chat API in production.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + internalGetPublishedContextFieldBuilder() { + if (publishedContextBuilder_ == null) { + publishedContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder>( + getPublishedContext(), getParentForChildren(), isClean()); + publishedContext_ = null; + } + return publishedContextBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Context lastPublishedContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + lastPublishedContextBuilder_; + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastPublishedContext field is set. + */ + public boolean hasLastPublishedContext() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastPublishedContext. + */ + public com.google.cloud.geminidataanalytics.v1.Context getLastPublishedContext() { + if (lastPublishedContextBuilder_ == null) { + return lastPublishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : lastPublishedContext_; + } else { + return lastPublishedContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastPublishedContext(com.google.cloud.geminidataanalytics.v1.Context value) { + if (lastPublishedContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastPublishedContext_ = value; + } else { + lastPublishedContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastPublishedContext( + com.google.cloud.geminidataanalytics.v1.Context.Builder builderForValue) { + if (lastPublishedContextBuilder_ == null) { + lastPublishedContext_ = builderForValue.build(); + } else { + lastPublishedContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastPublishedContext( + com.google.cloud.geminidataanalytics.v1.Context value) { + if (lastPublishedContextBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && lastPublishedContext_ != null + && lastPublishedContext_ + != com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance()) { + getLastPublishedContextBuilder().mergeFrom(value); + } else { + lastPublishedContext_ = value; + } + } else { + lastPublishedContextBuilder_.mergeFrom(value); + } + if (lastPublishedContext_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastPublishedContext() { + bitField0_ = (bitField0_ & ~0x00000004); + lastPublishedContext_ = null; + if (lastPublishedContextBuilder_ != null) { + lastPublishedContextBuilder_.dispose(); + lastPublishedContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Context.Builder + getLastPublishedContextBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLastPublishedContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ContextOrBuilder + getLastPublishedContextOrBuilder() { + if (lastPublishedContextBuilder_ != null) { + return lastPublishedContextBuilder_.getMessageOrBuilder(); + } else { + return lastPublishedContext_ == null + ? com.google.cloud.geminidataanalytics.v1.Context.getDefaultInstance() + : lastPublishedContext_; + } + } + + /** + * + * + *
+     * Output only. The last published context for the agent.
+     * This is an output-only field populated by the system when the
+     * published context is updated. It is used to restore the agent to a
+     * previous state.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder> + internalGetLastPublishedContextFieldBuilder() { + if (lastPublishedContextBuilder_ == null) { + lastPublishedContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Context, + com.google.cloud.geminidataanalytics.v1.Context.Builder, + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder>( + getLastPublishedContext(), getParentForChildren(), isClean()); + lastPublishedContext_ = null; + } + return lastPublishedContextBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) + private static final com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataAnalyticsAgent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAnalyticsAgent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataAnalyticsAgent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentOrBuilder.java new file mode 100644 index 000000000000..948cb1043766 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_analytics_agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataAnalyticsAgentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataAnalyticsAgent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the stagingContext field is set. + */ + boolean hasStagingContext(); + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stagingContext. + */ + com.google.cloud.geminidataanalytics.v1.Context getStagingContext(); + + /** + * + * + *
+   * Optional. The staging context for the agent.
+   * This context is used to test and validate changes before publishing.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context staging_context = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getStagingContextOrBuilder(); + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publishedContext field is set. + */ + boolean hasPublishedContext(); + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publishedContext. + */ + com.google.cloud.geminidataanalytics.v1.Context getPublishedContext(); + + /** + * + * + *
+   * Optional. The published context for the agent.
+   * This context is used by the Chat API in production.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context published_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getPublishedContextOrBuilder(); + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastPublishedContext field is set. + */ + boolean hasLastPublishedContext(); + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastPublishedContext. + */ + com.google.cloud.geminidataanalytics.v1.Context getLastPublishedContext(); + + /** + * + * + *
+   * Output only. The last published context for the agent.
+   * This is an output-only field populated by the system when the
+   * published context is updated. It is used to restore the agent to a
+   * previous state.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Context last_published_context = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.ContextOrBuilder getLastPublishedContextOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentProto.java new file mode 100644 index 000000000000..03b6dcba2c19 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataAnalyticsAgentProto.java @@ -0,0 +1,102 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_analytics_agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class DataAnalyticsAgentProto extends com.google.protobuf.GeneratedFile { + private DataAnalyticsAgentProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataAnalyticsAgentProto"); + } + + 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_geminidataanalytics_v1_DataAnalyticsAgent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_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/geminidataanalytics/v1/da" + + "ta_analytics_agent.proto\022#google.cloud.g" + + "eminidataanalytics.v1\032\037google/api/field_" + + "behavior.proto\0321google/cloud/geminidataa" + + "nalytics/v1/context.proto\"\201\002\n\022DataAnalyt" + + "icsAgent\022J\n\017staging_context\030\005 \001(\0132,.goog" + + "le.cloud.geminidataanalytics.v1.ContextB" + + "\003\340A\001\022L\n\021published_context\030\006 \001(\0132,.google" + + ".cloud.geminidataanalytics.v1.ContextB\003\340" + + "A\001\022Q\n\026last_published_context\030\007 \001(\0132,.goo" + + "gle.cloud.geminidataanalytics.v1.Context" + + "B\003\340A\003B\224\002\n\'com.google.cloud.geminidataana" + + "lytics.v1B\027DataAnalyticsAgentProtoP\001ZYcl" + + "oud.google.com/go/geminidataanalytics/ap" + + "iv1/geminidataanalyticspb;geminidataanal" + + "yticspb\252\002#Google.Cloud.GeminiDataAnalyti" + + "cs.V1\312\002#Google\\Cloud\\GeminiDataAnalytics" + + "\\V1\352\002&Google::Cloud::GeminiDataAnalytics" + + "::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.geminidataanalytics.v1.ContextProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DataAnalyticsAgent_descriptor, + new java.lang.String[] { + "StagingContext", "PublishedContext", "LastPublishedContext", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.geminidataanalytics.v1.ContextProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceProto.java new file mode 100644 index 000000000000..5a4b4b55107c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceProto.java @@ -0,0 +1,700 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class DataChatServiceProto extends com.google.protobuf.GeneratedFile { + private DataChatServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataChatServiceProto"); + } + + 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_geminidataanalytics_v1_ListMessagesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ChatRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataAgentContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ConversationReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ClientManagedResourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Message_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Message_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_UserMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_UserMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_TextMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_TextMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_AnalysisMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_AnalysisQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_AnalysisEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ChartMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ChartQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ChartResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ChartResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Blob_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Blob_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/geminidataanalytics/v1/data_chat_service.proto\022#google.cloud.gemi" + + "nidataanalytics.v1\032\034google/api/annotatio" + + "ns.proto\032\027google/api/client.proto\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\0321google/cloud/geminidataanalytics/v1/context.proto\0326google/cloud/g" + + "eminidataanalytics/v1/conversation.proto\0325google/cloud/geminidataanalytics/v1/cr" + + "edentials.proto\0324google/cloud/geminidata" + + "analytics/v1/datasource.proto\032\033google/pr" + + "otobuf/empty.proto\032\034google/protobuf/stru" + + "ct.proto\032\037google/protobuf/timestamp.proto\"\244\001\n" + + "\023ListMessagesRequest\022G\n" + + "\006parent\030\001 \001(\tB7\340A\002\372A1\n" + + "/geminidataanalytics.googleapis.com/Conversation\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\"v\n" + + "\024ListMessagesResponse\022E\n" + + "\010messages\030\001" + + " \003(\01323.google.cloud.geminidataanalytics.v1.StorageMessage\022\027\n" + + "\017next_page_token\030\002 \001(\t\"c\n" + + "\016StorageMessage\022\022\n\n" + + "message_id\030\001 \001(\t\022=\n" + + "\007message\030\002" + + " \001(\0132,.google.cloud.geminidataanalytics.v1.Message\"\323\007\n" + + "\013ChatRequest\022K\n" + + "\016inline_context\030e \001(\0132,.google.c" + + "loud.geminidataanalytics.v1.ContextB\003\340A\001H\000\022a\n" + + "\026conversation_reference\030g \001(\0132:.goo" + + "gle.cloud.geminidataanalytics.v1.ConversationReferenceB\003\340A\001H\000\022X\n" + + "\022data_agent_context\030h" + + " \001(\01325.google.cloud.geminidataanalytics.v1.DataAgentContextB\003\340A\001H\000\022q\n" + + "\037client_managed_resource_context\030i \001(\0132A.googl" + + "e.cloud.geminidataanalytics.v1.ClientManagedResourceContextB\003\340A\001H\000\022S\n" + + "\017looker_settings\030\r" + + " \001(\01323.google.cloud.geminidataanalytics.v1.LookerSettingsB\003\340A\001H\001\022\023\n" + + "\006parent\030\003 \001(\tB\003\340A\002\022C\n" + + "\010messages\030\002 \003(\0132,.google." + + "cloud.geminidataanalytics.v1.MessageB\003\340A\002\022J\n" + + "\013credentials\030\007" + + " \001(\01320.google.cloud.geminidataanalytics.v1.CredentialsB\003\340A\001\022Y\n" + + "\r" + + "thinking_mode\030\t \001(\0162=.google.cloud.gemi" + + "nidataanalytics.v1.ChatRequest.ThinkingModeB\003\340A\001\022J\n" + + "\005model\030\013 \001(\01626.google.cloud.g" + + "eminidataanalytics.v1.ChatRequest.ModelB\003\340A\001\"E\n" + + "\014ThinkingMode\022\035\n" + + "\031THINKING_MODE_UNSPECIFIED\020\000\022\010\n" + + "\004FAST\020\001\022\014\n" + + "\010THINKING\020\002\"3\n" + + "\005Model\022\025\n" + + "\021MODEL_UNSPECIFIED\020\000\022\023\n" + + "\017LATEST_GA_MODEL\020\001B\022\n" + + "\020context_providerB\025\n" + + "\023datasource_settings\"\217\002\n" + + "\020DataAgentContext\022H\n\n" + + "data_agent\030\001 \001(\tB4\340A\002\372A.\n" + + ",geminidataanalytics.googleapis.com/DataAgent\022b\n" + + "\017context_version\030\003 \001(\0162D.google.cloud.geminidataana" + + "lytics.v1.DataAgentContext.ContextVersionB\003\340A\001\"M\n" + + "\016ContextVersion\022\037\n" + + "\033CONTEXT_VERSION_UNSPECIFIED\020\000\022\013\n" + + "\007STAGING\020\001\022\r\n" + + "\tPUBLISHED\020\002\"\276\001\n" + + "\025ConversationReference\022M\n" + + "\014conversation\030\001 \001(\tB7\340A\002\372A1\n" + + "/geminidataanalytics.googleapis.com/Conversation\022V\n" + + "\022data_agent_context\030\003 \001(\01325.google.cloud.gemini" + + "dataanalytics.v1.DataAgentContextB\003\340A\002\"\236\001\n" + + "\034ClientManagedResourceContext\022I\n" + + "\016inline_context\030\001" + + " \001(\0132,.google.cloud.geminidataanalytics.v1.ContextB\003\340A\002\022\034\n" + + "\017conversation_id\030\002 \001(\tB\003\340A\001\022\025\n" + + "\010agent_id\030\003 \001(\tB\003\340A\001\"\366\001\n" + + "\007Message\022H\n" + + "\014user_message\030\002 \001(\01320.goog" + + "le.cloud.geminidataanalytics.v1.UserMessageH\000\022L\n" + + "\016system_message\030\003 \001(\01322.google.c" + + "loud.geminidataanalytics.v1.SystemMessageH\000\0222\n" + + "\ttimestamp\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\027\n\n" + + "message_id\030\004 \001(\tB\003\340A\001B\006\n" + + "\004kind\".\n" + + "\016LookerSettings\022\034\n" + + "\017enable_dev_mode\030\001 \001(\010B\003\340A\001\"%\n" + + "\013UserMessage\022\016\n" + + "\004text\030\001 \001(\tH\000B\006\n" + + "\004kind\"\362\004\n\r" + + "SystemMessage\022@\n" + + "\004text\030\001" + + " \001(\01320.google.cloud.geminidataanalytics.v1.TextMessageH\000\022D\n" + + "\006schema\030\002 \001(\01322.go" + + "ogle.cloud.geminidataanalytics.v1.SchemaMessageH\000\022@\n" + + "\004data\030\003" + + " \001(\01320.google.cloud.geminidataanalytics.v1.DataMessageH\000\022H\n" + + "\010analysis\030\004" + + " \001(\01324.google.cloud.geminidataanalytics.v1.AnalysisMessageH\000\022B\n" + + "\005chart\030\005" + + " \001(\01321.google.cloud.geminidataanalytics.v1.ChartMessageH\000\022B\n" + + "\005error\030\006 \001(\01321.googl" + + "e.cloud.geminidataanalytics.v1.ErrorMessageH\000\022S\n" + + "\017example_queries\030\r" + + " \001(\01323.google." + + "cloud.geminidataanalytics.v1.ExampleQueriesB\003\340A\001H\000\022\025\n" + + "\010group_id\030\014 \001(\005H\001\210\001\001\022D\n" + + "\010citation\030\017" + + " \001(\0132-.google.cloud.geminidataanalytics.v1.CitationB\003\340A\003B\006\n" + + "\004kindB\013\n" + + "\t_group_id\"\202\002\n" + + "\013TextMessage\022\022\n" + + "\005parts\030\001 \003(\tB\003\340A\001\022Q\n" + + "\ttext_type\030\002 \001(\01629.google.cloud.gemin" + + "idataanalytics.v1.TextMessage.TextTypeB\003\340A\001\022\036\n" + + "\021thought_signature\030\003 \001(\014B\003\340A\001\"l\n" + + "\010TextType\022\031\n" + + "\025TEXT_TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016FINAL_RESPONSE\020\001\022\013\n" + + "\007THOUGHT\020\002\022\014\n" + + "\010PROGRESS\020\003\022\026\n" + + "\022FOLLOWUP_QUESTIONS\020\004\"\237\001\n\r" + + "SchemaMessage\022A\n" + + "\005query\030\001" + + " \001(\01320.google.cloud.geminidataanalytics.v1.SchemaQueryH\000\022C\n" + + "\006result\030\002" + + " \001(\01321.google.cloud.geminidataanalytics.v1.SchemaResultH\000B\006\n" + + "\004kind\"$\n" + + "\013SchemaQuery\022\025\n" + + "\010question\030\001 \001(\tB\003\340A\001\"Y\n" + + "\014SchemaResult\022I\n" + + "\013datasources\030\001" + + " \003(\0132/.google.cloud.geminidataanalytics.v1.DatasourceB\003\340A\001\"\311\002\n" + + "\013DataMessage\022?\n" + + "\005query\030\001" + + " \001(\0132..google.cloud.geminidataanalytics.v1.DataQueryH\000\022\027\n" + + "\r" + + "generated_sql\030\002 \001(\tH\000\022A\n" + + "\006result\030\003 \001(\0132/" + + ".google.cloud.geminidataanalytics.v1.DataResultH\000\022I\n\r" + + "big_query_job\030\005 \001(\01320.googl" + + "e.cloud.geminidataanalytics.v1.BigQueryJobH\000\022J\n\r" + + "matched_query\030\006 \001(\01321.google.clo" + + "ud.geminidataanalytics.v1.MatchedQueryH\000B\006\n" + + "\004kind\"\327\001\n" + + "\tDataQuery\022G\n" + + "\006looker\030\004 \001(\01320" + + ".google.cloud.geminidataanalytics.v1.LookerQueryB\003\340A\001H\000\022\025\n" + + "\010question\030\001 \001(\tB\003\340A\001\022\021\n" + + "\004name\030\003 \001(\tB\003\340A\001\022I\n" + + "\013datasources\030\002 \003(\0132/" + + ".google.cloud.geminidataanalytics.v1.DatasourceB\003\340A\001B\014\n\n" + + "query_type\"\303\001\n\n" + + "DataResult\022\021\n" + + "\004name\030\003 \001(\tB\003\340A\001\022@\n" + + "\006schema\030\005 \001(\0132+.g" + + "oogle.cloud.geminidataanalytics.v1.SchemaB\003\340A\001\022*\n" + + "\004data\030\002 \003(\0132\027.google.protobuf.StructB\003\340A\001\0224\n" + + "\016formatted_data\030\006" + + " \003(\0132\027.google.protobuf.StructB\003\340A\001\"\361\001\n" + + "\013BigQueryJob\022\027\n\n" + + "project_id\030\001 \001(\tB\003\340A\002\022\023\n" + + "\006job_id\030\002 \001(\tB\003\340A\002\022\025\n" + + "\010location\030\005 \001(\tB\003\340A\001\022[\n" + + "\021destination_table\030\003 \001(\0132;.google.cloud.geminida" + + "taanalytics.v1.BigQueryTableReferenceB\003\340A\001\022@\n" + + "\006schema\030\007" + + " \001(\0132+.google.cloud.geminidataanalytics.v1.SchemaB\003\340A\001\"\254\001\n" + + "\017AnalysisMessage\022C\n" + + "\005query\030\001" + + " \001(\01322.google.cloud.geminidataanalytics.v1.AnalysisQueryH\000\022L\n" + + "\016progress_event\030\002" + + " \001(\01322.google.cloud.geminidataanalytics.v1.AnalysisEventH\000B\006\n" + + "\004kind\"F\n\r" + + "AnalysisQuery\022\025\n" + + "\010question\030\001 \001(\tB\003\340A\001\022\036\n" + + "\021data_result_names\030\002 \003(\tB\003\340A\001\"\252\002\n\r" + + "AnalysisEvent\022\033\n" + + "\021planner_reasoning\030\002 \001(\tH\000\022\033\n" + + "\021coder_instruction\030\003 \001(\tH\000\022\016\n" + + "\004code\030\004 \001(\tH\000\022\032\n" + + "\020execution_output\030\005 \001(\tH\000\022\031\n" + + "\017execution_error\030\006 \001(\tH\000\022 \n" + + "\026result_vega_chart_json\030\007 \001(\tH\000\022!\n" + + "\027result_natural_language\030\010 \001(\tH\000\022\031\n" + + "\017result_csv_data\030\t \001(\tH\000\022\037\n" + + "\025result_reference_data\030\n" + + " \001(\tH\000\022\017\n" + + "\005error\030\013 \001(\tH\000B\006\n" + + "\004kind\"\234\001\n" + + "\014ChartMessage\022@\n" + + "\005query\030\001" + + " \001(\0132/.google.cloud.geminidataanalytics.v1.ChartQueryH\000\022B\n" + + "\006result\030\002 \001(\01320.go" + + "ogle.cloud.geminidataanalytics.v1.ChartResultH\000B\006\n" + + "\004kind\"F\n\n" + + "ChartQuery\022\031\n" + + "\014instructions\030\001 \001(\tB\003\340A\001\022\035\n" + + "\020data_result_name\030\002 \001(\tB\003\340A\001\"\177\n" + + "\013ChartResult\0221\n" + + "\013vega_config\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\022=\n" + + "\005image\030\003" + + " \001(\0132).google.cloud.geminidataanalytics.v1.BlobB\003\340A\001\"!\n" + + "\014ErrorMessage\022\021\n" + + "\004text\030\001 \001(\tB\003\340A\003\"a\n" + + "\016ExampleQueries\022O\n" + + "\017example_queries\030\001" + + " \003(\01321.google.cloud.geminidataanalytics.v1.ExampleQueryB\003\340A\001\"1\n" + + "\004Blob\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004data\030\002 \001(\014B\003\340A\0022\247\n\n" + + "\017DataChatService\022\235\001\n" + + "\004Chat\0220.google.cloud.geminidataanalytics.v1.ChatRequest" + + "\032,.google.cloud.geminidataanalytics.v1.M" + + "essage\"3\202\323\344\223\002-\"(/v1/{parent=projects/*/locations/*}:chat:\001*0\001\022\366\001\n" + + "\022CreateConversation\022>.google.cloud.geminidataanalytics." + + "v1.CreateConversationRequest\0321.google.cloud.geminidataanalytics.v1.Conversation\"" + + "m\332A#parent,conversation,conversation_id\202" + + "\323\344\223\002A\"1/v1/{parent=projects/*/locations/*}/conversations:\014conversation\022\256\001\n" + + "\022DeleteConversation\022>.google.cloud.geminidataa" + + "nalytics.v1.DeleteConversationRequest\032\026." + + "google.protobuf.Empty\"@\332A\004name\202\323\344\223\0023*1/v" + + "1/{name=projects/*/locations/*/conversations/*}\022\303\001\n" + + "\017GetConversation\022;.google.cloud.geminidataanalytics.v1.GetConversatio" + + "nRequest\0321.google.cloud.geminidataanalyt" + + "ics.v1.Conversation\"@\332A\004name\202\323\344\223\0023\0221/v1/" + + "{name=projects/*/locations/*/conversations/*}\022\326\001\n" + + "\021ListConversations\022=.google.cloud.geminidataanalytics.v1.ListConversati" + + "onsRequest\032>.google.cloud.geminidataanal" + + "ytics.v1.ListConversationsResponse\"B\332A\006p" + + "arent\202\323\344\223\0023\0221/v1/{parent=projects/*/locations/*}/conversations\022\322\001\n" + + "\014ListMessages\0228.google.cloud.geminidataanalytics.v1.Li" + + "stMessagesRequest\0329.google.cloud.geminid" + + "ataanalytics.v1.ListMessagesResponse\"M\332A" + + "\006parent\202\323\344\223\002>\022 + * A filter on a datasource's underlying data. Filter syntax documentation: + * https://cloud.google.com/looker/docs/filter-expressions + * + * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataFilter} + */ +@com.google.protobuf.Generated +public final class DataFilter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataFilter) + DataFilterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataFilter"); + } + + // Use DataFilter.newBuilder() to construct. + private DataFilter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataFilter() { + field_ = ""; + value_ = ""; + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataFilter.class, + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + + /** + * + * + *
+   * Optional. The field to filter on. For example: ["event_date",
+   * "customer_id", "product_category"]
+   * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The field to filter on. For example: ["event_date",
+   * "customer_id", "product_category"]
+   * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+   * Optional. The default value used for this filter if the filter is not
+   * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The default value used for this filter if the filter is not
+   * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + + /** + * + * + *
+   * Optional. The type of filter present on a datasource, such as
+   * ALWAYS_FILTER.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. The type of filter present on a datasource, such as
+   * ALWAYS_FILTER.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilterType getType() { + com.google.cloud.geminidataanalytics.v1.DataFilterType result = + com.google.cloud.geminidataanalytics.v1.DataFilterType.forNumber(type_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.DataFilterType.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, field_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + if (type_ + != com.google.cloud.geminidataanalytics.v1.DataFilterType.DATA_FILTER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, field_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + if (type_ + != com.google.cloud.geminidataanalytics.v1.DataFilterType.DATA_FILTER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataFilter)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataFilter other = + (com.google.cloud.geminidataanalytics.v1.DataFilter) obj; + + if (!getField().equals(other.getField())) return false; + if (!getValue().equals(other.getValue())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter 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.geminidataanalytics.v1.DataFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter 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.geminidataanalytics.v1.DataFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataFilter 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A filter on a datasource's underlying data. Filter syntax documentation:
+   * https://cloud.google.com/looker/docs/filter-expressions
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataFilter) + com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataFilter.class, + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + value_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilter getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilter build() { + com.google.cloud.geminidataanalytics.v1.DataFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilter buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataFilter result = + new com.google.cloud.geminidataanalytics.v1.DataFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataFilter) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataFilter other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataFilter.getDefaultInstance()) + return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object field_ = ""; + + /** + * + * + *
+     * Optional. The field to filter on. For example: ["event_date",
+     * "customer_id", "product_category"]
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The field to filter on. For example: ["event_date",
+     * "customer_id", "product_category"]
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The field to filter on. For example: ["event_date",
+     * "customer_id", "product_category"]
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field to filter on. For example: ["event_date",
+     * "customer_id", "product_category"]
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field to filter on. For example: ["event_date",
+     * "customer_id", "product_category"]
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+     * Optional. The default value used for this filter if the filter is not
+     * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The default value used for this filter if the filter is not
+     * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The default value used for this filter if the filter is not
+     * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The default value used for this filter if the filter is not
+     * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The default value used for this filter if the filter is not
+     * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Optional. The type of filter present on a datasource, such as
+     * ALWAYS_FILTER.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. The type of filter present on a datasource, such as
+     * ALWAYS_FILTER.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of filter present on a datasource, such as
+     * ALWAYS_FILTER.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilterType getType() { + com.google.cloud.geminidataanalytics.v1.DataFilterType result = + com.google.cloud.geminidataanalytics.v1.DataFilterType.forNumber(type_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.DataFilterType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The type of filter present on a datasource, such as
+     * ALWAYS_FILTER.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.geminidataanalytics.v1.DataFilterType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of filter present on a datasource, such as
+     * ALWAYS_FILTER.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataFilter) + private static final com.google.cloud.geminidataanalytics.v1.DataFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataFilter(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterOrBuilder.java new file mode 100644 index 000000000000..96263532afb8 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The field to filter on. For example: ["event_date",
+   * "customer_id", "product_category"]
+   * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The field. + */ + java.lang.String getField(); + + /** + * + * + *
+   * Optional. The field to filter on. For example: ["event_date",
+   * "customer_id", "product_category"]
+   * 
+ * + * string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * Optional. The default value used for this filter if the filter is not
+   * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+   * Optional. The default value used for this filter if the filter is not
+   * overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"]
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+   * Optional. The type of filter present on a datasource, such as
+   * ALWAYS_FILTER.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. The type of filter present on a datasource, such as
+   * ALWAYS_FILTER.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataFilterType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.cloud.geminidataanalytics.v1.DataFilterType getType(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterType.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterType.java new file mode 100644 index 000000000000..93dc544fea88 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataFilterType.java @@ -0,0 +1,174 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The type of filter present on a datasource, such as ALWAYS_FILTER.
+ * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.DataFilterType} + */ +@com.google.protobuf.Generated +public enum DataFilterType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The filter type was not specified.
+   * 
+ * + * DATA_FILTER_TYPE_UNSPECIFIED = 0; + */ + DATA_FILTER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * A filter that the user configures, and any queries to the Explore will
+   * always apply this filter by default. Currently only used for Looker data
+   * sources.
+   * 
+ * + * ALWAYS_FILTER = 1; + */ + ALWAYS_FILTER(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataFilterType"); + } + + /** + * + * + *
+   * The filter type was not specified.
+   * 
+ * + * DATA_FILTER_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_FILTER_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * A filter that the user configures, and any queries to the Explore will
+   * always apply this filter by default. Currently only used for Looker data
+   * sources.
+   * 
+ * + * ALWAYS_FILTER = 1; + */ + public static final int ALWAYS_FILTER_VALUE = 1; + + 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 DataFilterType 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 DataFilterType forNumber(int value) { + switch (value) { + case 0: + return DATA_FILTER_TYPE_UNSPECIFIED; + case 1: + return ALWAYS_FILTER; + 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 DataFilterType findValueByNumber(int number) { + return DataFilterType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFilterType[] VALUES = values(); + + public static DataFilterType 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 DataFilterType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.DataFilterType) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessage.java new file mode 100644 index 000000000000..9495fabc331a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessage.java @@ -0,0 +1,1960 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message produced during data retrieval.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataMessage} + */ +@com.google.protobuf.Generated +public final class DataMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataMessage) + DataMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataMessage"); + } + + // Use DataMessage.newBuilder() to construct. + private DataMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataMessage.class, + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QUERY(1), + GENERATED_SQL(2), + RESULT(3), + BIG_QUERY_JOB(5), + MATCHED_QUERY(6), + 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 QUERY; + case 2: + return GENERATED_SQL; + case 3: + return RESULT; + case 5: + return BIG_QUERY_JOB; + case 6: + return MATCHED_QUERY; + 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 QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQuery getQuery() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder getQueryOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + + public static final int GENERATED_SQL_FIELD_NUMBER = 2; + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return Whether the generatedSql field is set. + */ + public boolean hasGeneratedSql() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return The generatedSql. + */ + public java.lang.String getGeneratedSql() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + 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 (kindCase_ == 2) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return The bytes for generatedSql. + */ + public com.google.protobuf.ByteString getGeneratedSqlBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 3; + } + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResult getResult() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder getResultOrBuilder() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + + public static final int BIG_QUERY_JOB_FIELD_NUMBER = 5; + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return Whether the bigQueryJob field is set. + */ + @java.lang.Override + public boolean hasBigQueryJob() { + return kindCase_ == 5; + } + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return The bigQueryJob. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJob getBigQueryJob() { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder getBigQueryJobOrBuilder() { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + + public static final int MATCHED_QUERY_FIELD_NUMBER = 6; + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return Whether the matchedQuery field is set. + */ + @java.lang.Override + public boolean hasMatchedQuery() { + return kindCase_ == 6; + } + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return The matchedQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQuery getMatchedQuery() { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder getMatchedQueryOrBuilder() { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.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.geminidataanalytics.v1.DataQuery) kind_); + } + if (kindCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (com.google.cloud.geminidataanalytics.v1.DataResult) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_); + } + getUnknownFields().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.geminidataanalytics.v1.DataQuery) kind_); + } + if (kindCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.geminidataanalytics.v1.DataResult) kind_); + } + if (kindCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataMessage other = + (com.google.cloud.geminidataanalytics.v1.DataMessage) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 2: + if (!getGeneratedSql().equals(other.getGeneratedSql())) return false; + break; + case 3: + if (!getResult().equals(other.getResult())) return false; + break; + case 5: + if (!getBigQueryJob().equals(other.getBigQueryJob())) return false; + break; + case 6: + if (!getMatchedQuery().equals(other.getMatchedQuery())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + GENERATED_SQL_FIELD_NUMBER; + hash = (53 * hash) + getGeneratedSql().hashCode(); + break; + case 3: + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + break; + case 5: + hash = (37 * hash) + BIG_QUERY_JOB_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryJob().hashCode(); + break; + case 6: + hash = (37 * hash) + MATCHED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getMatchedQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage 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.geminidataanalytics.v1.DataMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage 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.geminidataanalytics.v1.DataMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataMessage) + com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataMessage.class, + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + if (resultBuilder_ != null) { + resultBuilder_.clear(); + } + if (bigQueryJobBuilder_ != null) { + bigQueryJobBuilder_.clear(); + } + if (matchedQueryBuilder_ != null) { + matchedQueryBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessage build() { + com.google.cloud.geminidataanalytics.v1.DataMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataMessage result = + new com.google.cloud.geminidataanalytics.v1.DataMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataMessage result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.DataMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && queryBuilder_ != null) { + result.kind_ = queryBuilder_.build(); + } + if (kindCase_ == 3 && resultBuilder_ != null) { + result.kind_ = resultBuilder_.build(); + } + if (kindCase_ == 5 && bigQueryJobBuilder_ != null) { + result.kind_ = bigQueryJobBuilder_.build(); + } + if (kindCase_ == 6 && matchedQueryBuilder_ != null) { + result.kind_ = matchedQueryBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case GENERATED_SQL: + { + kindCase_ = 2; + kind_ = other.kind_; + onChanged(); + break; + } + case RESULT: + { + mergeResult(other.getResult()); + break; + } + case BIG_QUERY_JOB: + { + mergeBigQueryJob(other.getBigQueryJob()); + break; + } + case MATCHED_QUERY: + { + mergeMatchedQuery(other.getMatchedQuery()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 2; + kind_ = s; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetResultFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + case 42: + { + input.readMessage( + internalGetBigQueryJobFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetMatchedQueryFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataQuery, + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder, + com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder> + queryBuilder_; + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQuery getQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return queryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + public Builder setQuery(com.google.cloud.geminidataanalytics.v1.DataQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + public Builder setQuery( + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + public Builder mergeQuery(com.google.cloud.geminidataanalytics.v1.DataQuery value) { + if (queryBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.DataQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + queryBuilder_.mergeFrom(value); + } else { + queryBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + queryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataQuery.Builder getQueryBuilder() { + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder getQueryOrBuilder() { + if ((kindCase_ == 1) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A data retrieval query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataQuery, + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder, + com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataQuery, + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder, + com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.DataQuery) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return queryBuilder_; + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @return Whether the generatedSql field is set. + */ + @java.lang.Override + public boolean hasGeneratedSql() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @return The generatedSql. + */ + @java.lang.Override + public java.lang.String getGeneratedSql() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 2) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @return The bytes for generatedSql. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneratedSqlBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @param value The generatedSql to set. + * @return This builder for chaining. + */ + public Builder setGeneratedSql(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @return This builder for chaining. + */ + public Builder clearGeneratedSql() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * SQL generated by the system to retrieve data.
+     * 
+ * + * string generated_sql = 2; + * + * @param value The bytes for generatedSql to set. + * @return This builder for chaining. + */ + public Builder setGeneratedSqlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataResult, + com.google.cloud.geminidataanalytics.v1.DataResult.Builder, + com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder> + resultBuilder_; + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 3; + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResult getResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return resultBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + public Builder setResult(com.google.cloud.geminidataanalytics.v1.DataResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + public Builder setResult( + com.google.cloud.geminidataanalytics.v1.DataResult.Builder builderForValue) { + if (resultBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + public Builder mergeResult(com.google.cloud.geminidataanalytics.v1.DataResult value) { + if (resultBuilder_ == null) { + if (kindCase_ == 3 + && kind_ != com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.DataResult.newBuilder( + (com.google.cloud.geminidataanalytics.v1.DataResult) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + resultBuilder_.mergeFrom(value); + } else { + resultBuilder_.setMessage(value); + } + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + resultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + public com.google.cloud.geminidataanalytics.v1.DataResult.Builder getResultBuilder() { + return internalGetResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder getResultOrBuilder() { + if ((kindCase_ == 3) && (resultBuilder_ != null)) { + return resultBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Retrieved data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataResult, + com.google.cloud.geminidataanalytics.v1.DataResult.Builder, + com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder> + internalGetResultFieldBuilder() { + if (resultBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataResult, + com.google.cloud.geminidataanalytics.v1.DataResult.Builder, + com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.DataResult) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged(); + return resultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryJob, + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder> + bigQueryJobBuilder_; + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return Whether the bigQueryJob field is set. + */ + @java.lang.Override + public boolean hasBigQueryJob() { + return kindCase_ == 5; + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return The bigQueryJob. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJob getBigQueryJob() { + if (bigQueryJobBuilder_ == null) { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return bigQueryJobBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + public Builder setBigQueryJob(com.google.cloud.geminidataanalytics.v1.BigQueryJob value) { + if (bigQueryJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bigQueryJobBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + public Builder setBigQueryJob( + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder builderForValue) { + if (bigQueryJobBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bigQueryJobBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + public Builder mergeBigQueryJob(com.google.cloud.geminidataanalytics.v1.BigQueryJob value) { + if (bigQueryJobBuilder_ == null) { + if (kindCase_ == 5 + && kind_ != com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.BigQueryJob.newBuilder( + (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + bigQueryJobBuilder_.mergeFrom(value); + } else { + bigQueryJobBuilder_.setMessage(value); + } + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + public Builder clearBigQueryJob() { + if (bigQueryJobBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + bigQueryJobBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder getBigQueryJobBuilder() { + return internalGetBigQueryJobFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder getBigQueryJobOrBuilder() { + if ((kindCase_ == 5) && (bigQueryJobBuilder_ != null)) { + return bigQueryJobBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A BigQuery job executed by the system to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryJob, + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder> + internalGetBigQueryJobFieldBuilder() { + if (bigQueryJobBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = com.google.cloud.geminidataanalytics.v1.BigQueryJob.getDefaultInstance(); + } + bigQueryJobBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryJob, + com.google.cloud.geminidataanalytics.v1.BigQueryJob.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.BigQueryJob) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 5; + onChanged(); + return bigQueryJobBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.MatchedQuery, + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder, + com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder> + matchedQueryBuilder_; + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return Whether the matchedQuery field is set. + */ + @java.lang.Override + public boolean hasMatchedQuery() { + return kindCase_ == 6; + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return The matchedQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQuery getMatchedQuery() { + if (matchedQueryBuilder_ == null) { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return matchedQueryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + public Builder setMatchedQuery(com.google.cloud.geminidataanalytics.v1.MatchedQuery value) { + if (matchedQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + matchedQueryBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + public Builder setMatchedQuery( + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder builderForValue) { + if (matchedQueryBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + matchedQueryBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + public Builder mergeMatchedQuery(com.google.cloud.geminidataanalytics.v1.MatchedQuery value) { + if (matchedQueryBuilder_ == null) { + if (kindCase_ == 6 + && kind_ != com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.MatchedQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + matchedQueryBuilder_.mergeFrom(value); + } else { + matchedQueryBuilder_.setMessage(value); + } + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + public Builder clearMatchedQuery() { + if (matchedQueryBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + matchedQueryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + public com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder getMatchedQueryBuilder() { + return internalGetMatchedQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder + getMatchedQueryOrBuilder() { + if ((kindCase_ == 6) && (matchedQueryBuilder_ != null)) { + return matchedQueryBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A pre-existing query that was matched to retrieve data.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.MatchedQuery, + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder, + com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder> + internalGetMatchedQueryFieldBuilder() { + if (matchedQueryBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } + matchedQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.MatchedQuery, + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder, + com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.MatchedQuery) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 6; + onChanged(); + return matchedQueryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataMessage) + private static final com.google.cloud.geminidataanalytics.v1.DataMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessageOrBuilder.java new file mode 100644 index 000000000000..0cddbd0528c6 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataMessageOrBuilder.java @@ -0,0 +1,217 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + * + * @return The query. + */ + com.google.cloud.geminidataanalytics.v1.DataQuery getQuery(); + + /** + * + * + *
+   * A data retrieval query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataQuery query = 1; + */ + com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return Whether the generatedSql field is set. + */ + boolean hasGeneratedSql(); + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return The generatedSql. + */ + java.lang.String getGeneratedSql(); + + /** + * + * + *
+   * SQL generated by the system to retrieve data.
+   * 
+ * + * string generated_sql = 2; + * + * @return The bytes for generatedSql. + */ + com.google.protobuf.ByteString getGeneratedSqlBytes(); + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + * + * @return The result. + */ + com.google.cloud.geminidataanalytics.v1.DataResult getResult(); + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataResult result = 3; + */ + com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder getResultOrBuilder(); + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return Whether the bigQueryJob field is set. + */ + boolean hasBigQueryJob(); + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + * + * @return The bigQueryJob. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryJob getBigQueryJob(); + + /** + * + * + *
+   * A BigQuery job executed by the system to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryJob big_query_job = 5; + */ + com.google.cloud.geminidataanalytics.v1.BigQueryJobOrBuilder getBigQueryJobOrBuilder(); + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return Whether the matchedQuery field is set. + */ + boolean hasMatchedQuery(); + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + * + * @return The matchedQuery. + */ + com.google.cloud.geminidataanalytics.v1.MatchedQuery getMatchedQuery(); + + /** + * + * + *
+   * A pre-existing query that was matched to retrieve data.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.MatchedQuery matched_query = 6; + */ + com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder getMatchedQueryOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.DataMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQuery.java new file mode 100644 index 000000000000..7b9fc04e4094 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQuery.java @@ -0,0 +1,1805 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query for retrieving data.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataQuery} + */ +@com.google.protobuf.Generated +public final class DataQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataQuery) + DataQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataQuery"); + } + + // Use DataQuery.newBuilder() to construct. + private DataQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataQuery() { + question_ = ""; + name_ = ""; + datasources_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataQuery.class, + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder.class); + } + + private int queryTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object queryType_; + + public enum QueryTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOOKER(4), + QUERYTYPE_NOT_SET(0); + private final int value; + + private QueryTypeCase(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 QueryTypeCase valueOf(int value) { + return forNumber(value); + } + + public static QueryTypeCase forNumber(int value) { + switch (value) { + case 4: + return LOOKER; + case 0: + return QUERYTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public QueryTypeCase getQueryTypeCase() { + return QueryTypeCase.forNumber(queryTypeCase_); + } + + public static final int LOOKER_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the looker field is set. + */ + @java.lang.Override + public boolean hasLooker() { + return queryTypeCase_ == 4; + } + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The looker. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery getLooker() { + if (queryTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_; + } + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerOrBuilder() { + if (queryTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_; + } + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + + public static final int QUESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object question_ = ""; + + /** + * + * + *
+   * Optional. A natural language question to answer.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + @java.lang.Override + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + 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(); + question_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A natural language question to answer.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. A snake-case name for the query that reflects its intent. It is
+   * used to name the corresponding data result, so that it can be referenced in
+   * later steps.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A snake-case name for the query that reflects its intent. It is
+   * used to name the corresponding data result, so that it can be referenced in
+   * later steps.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 DATASOURCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List datasources_; + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getDatasourcesList() { + return datasources_; + } + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDatasourcesOrBuilderList() { + return datasources_; + } + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDatasourcesCount() { + return datasources_.size(); + } + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index) { + return datasources_.get(index); + } + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder( + int index) { + return datasources_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, question_); + } + for (int i = 0; i < datasources_.size(); i++) { + output.writeMessage(2, datasources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); + } + if (queryTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, question_); + } + for (int i = 0; i < datasources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, datasources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); + } + if (queryTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataQuery other = + (com.google.cloud.geminidataanalytics.v1.DataQuery) obj; + + if (!getQuestion().equals(other.getQuestion())) return false; + if (!getName().equals(other.getName())) return false; + if (!getDatasourcesList().equals(other.getDatasourcesList())) return false; + if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false; + switch (queryTypeCase_) { + case 4: + if (!getLooker().equals(other.getLooker())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUESTION_FIELD_NUMBER; + hash = (53 * hash) + getQuestion().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDatasourcesCount() > 0) { + hash = (37 * hash) + DATASOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDatasourcesList().hashCode(); + } + switch (queryTypeCase_) { + case 4: + hash = (37 * hash) + LOOKER_FIELD_NUMBER; + hash = (53 * hash) + getLooker().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery 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.geminidataanalytics.v1.DataQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery 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.geminidataanalytics.v1.DataQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query for retrieving data.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataQuery) + com.google.cloud.geminidataanalytics.v1.DataQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataQuery.class, + com.google.cloud.geminidataanalytics.v1.DataQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (lookerBuilder_ != null) { + lookerBuilder_.clear(); + } + question_ = ""; + name_ = ""; + if (datasourcesBuilder_ == null) { + datasources_ = java.util.Collections.emptyList(); + } else { + datasources_ = null; + datasourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + queryTypeCase_ = 0; + queryType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQuery build() { + com.google.cloud.geminidataanalytics.v1.DataQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataQuery result = + new com.google.cloud.geminidataanalytics.v1.DataQuery(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.DataQuery result) { + if (datasourcesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + datasources_ = java.util.Collections.unmodifiableList(datasources_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.datasources_ = datasources_; + } else { + result.datasources_ = datasourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.question_ = question_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.DataQuery result) { + result.queryTypeCase_ = queryTypeCase_; + result.queryType_ = this.queryType_; + if (queryTypeCase_ == 4 && lookerBuilder_ != null) { + result.queryType_ = lookerBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataQuery.getDefaultInstance()) + return this; + if (!other.getQuestion().isEmpty()) { + question_ = other.question_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (datasourcesBuilder_ == null) { + if (!other.datasources_.isEmpty()) { + if (datasources_.isEmpty()) { + datasources_ = other.datasources_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDatasourcesIsMutable(); + datasources_.addAll(other.datasources_); + } + onChanged(); + } + } else { + if (!other.datasources_.isEmpty()) { + if (datasourcesBuilder_.isEmpty()) { + datasourcesBuilder_.dispose(); + datasourcesBuilder_ = null; + datasources_ = other.datasources_; + bitField0_ = (bitField0_ & ~0x00000008); + datasourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDatasourcesFieldBuilder() + : null; + } else { + datasourcesBuilder_.addAllMessages(other.datasources_); + } + } + } + switch (other.getQueryTypeCase()) { + case LOOKER: + { + mergeLooker(other.getLooker()); + break; + } + case QUERYTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + question_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + com.google.cloud.geminidataanalytics.v1.Datasource m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Datasource.parser(), + extensionRegistry); + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(m); + } else { + datasourcesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetLookerFieldBuilder().getBuilder(), extensionRegistry); + queryTypeCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int queryTypeCase_ = 0; + private java.lang.Object queryType_; + + public QueryTypeCase getQueryTypeCase() { + return QueryTypeCase.forNumber(queryTypeCase_); + } + + public Builder clearQueryType() { + queryTypeCase_ = 0; + queryType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder> + lookerBuilder_; + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the looker field is set. + */ + @java.lang.Override + public boolean hasLooker() { + return queryTypeCase_ == 4; + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The looker. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery getLooker() { + if (lookerBuilder_ == null) { + if (queryTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_; + } + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } else { + if (queryTypeCase_ == 4) { + return lookerBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLooker(com.google.cloud.geminidataanalytics.v1.LookerQuery value) { + if (lookerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryType_ = value; + onChanged(); + } else { + lookerBuilder_.setMessage(value); + } + queryTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLooker( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder builderForValue) { + if (lookerBuilder_ == null) { + queryType_ = builderForValue.build(); + onChanged(); + } else { + lookerBuilder_.setMessage(builderForValue.build()); + } + queryTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLooker(com.google.cloud.geminidataanalytics.v1.LookerQuery value) { + if (lookerBuilder_ == null) { + if (queryTypeCase_ == 4 + && queryType_ + != com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance()) { + queryType_ = + com.google.cloud.geminidataanalytics.v1.LookerQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_) + .mergeFrom(value) + .buildPartial(); + } else { + queryType_ = value; + } + onChanged(); + } else { + if (queryTypeCase_ == 4) { + lookerBuilder_.mergeFrom(value); + } else { + lookerBuilder_.setMessage(value); + } + } + queryTypeCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLooker() { + if (lookerBuilder_ == null) { + if (queryTypeCase_ == 4) { + queryTypeCase_ = 0; + queryType_ = null; + onChanged(); + } + } else { + if (queryTypeCase_ == 4) { + queryTypeCase_ = 0; + queryType_ = null; + } + lookerBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder getLookerBuilder() { + return internalGetLookerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerOrBuilder() { + if ((queryTypeCase_ == 4) && (lookerBuilder_ != null)) { + return lookerBuilder_.getMessageOrBuilder(); + } else { + if (queryTypeCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_; + } + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A query for retrieving data from a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder> + internalGetLookerFieldBuilder() { + if (lookerBuilder_ == null) { + if (!(queryTypeCase_ == 4)) { + queryType_ = com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + lookerBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.LookerQuery) queryType_, + getParentForChildren(), + isClean()); + queryType_ = null; + } + queryTypeCase_ = 4; + onChanged(); + return lookerBuilder_; + } + + private java.lang.Object question_ = ""; + + /** + * + * + *
+     * Optional. A natural language question to answer.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + question_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A natural language question to answer.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A natural language question to answer.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The question to set. + * @return This builder for chaining. + */ + public Builder setQuestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + question_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A natural language question to answer.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQuestion() { + question_ = getDefaultInstance().getQuestion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A natural language question to answer.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for question to set. + * @return This builder for chaining. + */ + public Builder setQuestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + question_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. A snake-case name for the query that reflects its intent. It is
+     * used to name the corresponding data result, so that it can be referenced in
+     * later steps.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A snake-case name for the query that reflects its intent. It is
+     * used to name the corresponding data result, so that it can be referenced in
+     * later steps.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A snake-case name for the query that reflects its intent. It is
+     * used to name the corresponding data result, so that it can be referenced in
+     * later steps.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A snake-case name for the query that reflects its intent. It is
+     * used to name the corresponding data result, so that it can be referenced in
+     * later steps.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A snake-case name for the query that reflects its intent. It is
+     * used to name the corresponding data result, so that it can be referenced in
+     * later steps.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List datasources_ = + java.util.Collections.emptyList(); + + private void ensureDatasourcesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + datasources_ = + new java.util.ArrayList( + datasources_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder> + datasourcesBuilder_; + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDatasourcesList() { + if (datasourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasources_); + } else { + return datasourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDatasourcesCount() { + if (datasourcesBuilder_ == null) { + return datasources_.size(); + } else { + return datasourcesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index) { + if (datasourcesBuilder_ == null) { + return datasources_.get(index); + } else { + return datasourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.set(index, value); + onChanged(); + } else { + datasourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.set(index, builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources(com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.add(value); + onChanged(); + } else { + datasourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.add(index, value); + onChanged(); + } else { + datasourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(index, builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDatasources( + java.lang.Iterable values) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasources_); + onChanged(); + } else { + datasourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatasources() { + if (datasourcesBuilder_ == null) { + datasources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + datasourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDatasources(int index) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.remove(index); + onChanged(); + } else { + datasourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder getDatasourcesBuilder( + int index) { + return internalGetDatasourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder( + int index) { + if (datasourcesBuilder_ == null) { + return datasources_.get(index); + } else { + return datasourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDatasourcesOrBuilderList() { + if (datasourcesBuilder_ != null) { + return datasourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasources_); + } + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder addDatasourcesBuilder() { + return internalGetDatasourcesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder addDatasourcesBuilder( + int index) { + return internalGetDatasourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The datasources available to answer the question.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDatasourcesBuilderList() { + return internalGetDatasourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder> + internalGetDatasourcesFieldBuilder() { + if (datasourcesBuilder_ == null) { + datasourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder>( + datasources_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + datasources_ = null; + } + return datasourcesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataQuery) + private static final com.google.cloud.geminidataanalytics.v1.DataQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQueryOrBuilder.java new file mode 100644 index 000000000000..09944f74523a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataQueryOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the looker field is set. + */ + boolean hasLooker(); + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The looker. + */ + com.google.cloud.geminidataanalytics.v1.LookerQuery getLooker(); + + /** + * + * + *
+   * Optional. A query for retrieving data from a Looker explore.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerOrBuilder(); + + /** + * + * + *
+   * Optional. A natural language question to answer.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + java.lang.String getQuestion(); + + /** + * + * + *
+   * Optional. A natural language question to answer.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + com.google.protobuf.ByteString getQuestionBytes(); + + /** + * + * + *
+   * Optional. A snake-case name for the query that reflects its intent. It is
+   * used to name the corresponding data result, so that it can be referenced in
+   * later steps.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. A snake-case name for the query that reflects its intent. It is
+   * used to name the corresponding data result, so that it can be referenced in
+   * later steps.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getDatasourcesList(); + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index); + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDatasourcesCount(); + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDatasourcesOrBuilderList(); + + /** + * + * + *
+   * Optional. The datasources available to answer the question.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder(int index); + + com.google.cloud.geminidataanalytics.v1.DataQuery.QueryTypeCase getQueryTypeCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResult.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResult.java new file mode 100644 index 000000000000..15546cb58672 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResult.java @@ -0,0 +1,2218 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Retrieved data.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataResult} + */ +@com.google.protobuf.Generated +public final class DataResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DataResult) + DataResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataResult"); + } + + // Use DataResult.newBuilder() to construct. + private DataResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataResult() { + name_ = ""; + data_ = java.util.Collections.emptyList(); + formattedData_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataResult.class, + com.google.cloud.geminidataanalytics.v1.DataResult.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. A snake-case name for the data result that reflects its contents.
+   * The name is used to pass the result around by reference, and serves as a
+   * signal about its meaning.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A snake-case name for the data result that reflects its contents.
+   * The name is used to pass the result around by reference, and serves as a
+   * signal about its meaning.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 SCHEMA_FIELD_NUMBER = 5; + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + public static final int DATA_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List data_; + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getDataList() { + return data_; + } + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getDataOrBuilderList() { + return data_; + } + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDataCount() { + return data_.size(); + } + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getData(int index) { + return data_.get(index); + } + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDataOrBuilder(int index) { + return data_.get(index); + } + + public static final int FORMATTED_DATA_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List formattedData_; + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFormattedDataList() { + return formattedData_; + } + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFormattedDataOrBuilderList() { + return formattedData_; + } + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFormattedDataCount() { + return formattedData_.size(); + } + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getFormattedData(int index) { + return formattedData_.get(index); + } + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getFormattedDataOrBuilder(int index) { + return formattedData_.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 < data_.size(); i++) { + output.writeMessage(2, data_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getSchema()); + } + for (int i = 0; i < formattedData_.size(); i++) { + output.writeMessage(6, formattedData_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < data_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, data_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSchema()); + } + for (int i = 0; i < formattedData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, formattedData_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.DataResult)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DataResult other = + (com.google.cloud.geminidataanalytics.v1.DataResult) obj; + + if (!getName().equals(other.getName())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (!getDataList().equals(other.getDataList())) return false; + if (!getFormattedDataList().equals(other.getFormattedDataList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (getDataCount() > 0) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getDataList().hashCode(); + } + if (getFormattedDataCount() > 0) { + hash = (37 * hash) + FORMATTED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getFormattedDataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult 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.geminidataanalytics.v1.DataResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult 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.geminidataanalytics.v1.DataResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DataResult 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Retrieved data.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DataResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DataResult) + com.google.cloud.geminidataanalytics.v1.DataResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DataResult.class, + com.google.cloud.geminidataanalytics.v1.DataResult.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DataResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); + internalGetDataFieldBuilder(); + internalGetFormattedDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + if (dataBuilder_ == null) { + data_ = java.util.Collections.emptyList(); + } else { + data_ = null; + dataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (formattedDataBuilder_ == null) { + formattedData_ = java.util.Collections.emptyList(); + } else { + formattedData_ = null; + formattedDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DataResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResult getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResult build() { + com.google.cloud.geminidataanalytics.v1.DataResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataResult buildPartial() { + com.google.cloud.geminidataanalytics.v1.DataResult result = + new com.google.cloud.geminidataanalytics.v1.DataResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.DataResult result) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + data_ = java.util.Collections.unmodifiableList(data_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + if (formattedDataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + formattedData_ = java.util.Collections.unmodifiableList(formattedData_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.formattedData_ = formattedData_; + } else { + result.formattedData_ = formattedDataBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DataResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DataResult) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DataResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DataResult other) { + if (other == com.google.cloud.geminidataanalytics.v1.DataResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (dataBuilder_ == null) { + if (!other.data_.isEmpty()) { + if (data_.isEmpty()) { + data_ = other.data_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDataIsMutable(); + data_.addAll(other.data_); + } + onChanged(); + } + } else { + if (!other.data_.isEmpty()) { + if (dataBuilder_.isEmpty()) { + dataBuilder_.dispose(); + dataBuilder_ = null; + data_ = other.data_; + bitField0_ = (bitField0_ & ~0x00000004); + dataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataFieldBuilder() + : null; + } else { + dataBuilder_.addAllMessages(other.data_); + } + } + } + if (formattedDataBuilder_ == null) { + if (!other.formattedData_.isEmpty()) { + if (formattedData_.isEmpty()) { + formattedData_ = other.formattedData_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFormattedDataIsMutable(); + formattedData_.addAll(other.formattedData_); + } + onChanged(); + } + } else { + if (!other.formattedData_.isEmpty()) { + if (formattedDataBuilder_.isEmpty()) { + formattedDataBuilder_.dispose(); + formattedDataBuilder_ = null; + formattedData_ = other.formattedData_; + bitField0_ = (bitField0_ & ~0x00000008); + formattedDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFormattedDataFieldBuilder() + : null; + } else { + formattedDataBuilder_.addAllMessages(other.formattedData_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.protobuf.Struct m = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(m); + } else { + dataBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 42: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: + { + com.google.protobuf.Struct m = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + formattedData_.add(m); + } else { + formattedDataBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. A snake-case name for the data result that reflects its contents.
+     * The name is used to pass the result around by reference, and serves as a
+     * signal about its meaning.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A snake-case name for the data result that reflects its contents.
+     * The name is used to pass the result around by reference, and serves as a
+     * signal about its meaning.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A snake-case name for the data result that reflects its contents.
+     * The name is used to pass the result around by reference, and serves as a
+     * signal about its meaning.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A snake-case name for the data result that reflects its contents.
+     * The name is used to pass the result around by reference, and serves as a
+     * signal about its meaning.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A snake-case name for the data result that reflects its contents.
+     * The name is used to pass the result around by reference, and serves as a
+     * signal about its meaning.
+     *
+     * * Example: "total_sales_by_product"
+     * * Example: "sales_for_product_12345"
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && schema_ != null + && schema_ != com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + } + + /** + * + * + *
+     * Optional. The schema of the data.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private java.util.List data_ = java.util.Collections.emptyList(); + + private void ensureDataIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + data_ = new java.util.ArrayList(data_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + dataBuilder_; + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDataList() { + if (dataBuilder_ == null) { + return java.util.Collections.unmodifiableList(data_); + } else { + return dataBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDataCount() { + if (dataBuilder_ == null) { + return data_.size(); + } else { + return dataBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct getData(int index) { + if (dataBuilder_ == null) { + return data_.get(index); + } else { + return dataBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setData(int index, com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.set(index, value); + onChanged(); + } else { + dataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setData(int index, com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.set(index, builderForValue.build()); + onChanged(); + } else { + dataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.add(value); + onChanged(); + } else { + dataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addData(int index, com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.add(index, value); + onChanged(); + } else { + dataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addData(com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(builderForValue.build()); + onChanged(); + } else { + dataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addData(int index, com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(index, builderForValue.build()); + onChanged(); + } else { + dataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllData(java.lang.Iterable values) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, data_); + onChanged(); + } else { + dataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + dataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeData(int index) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.remove(index); + onChanged(); + } else { + dataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getDataBuilder(int index) { + return internalGetDataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getDataOrBuilder(int index) { + if (dataBuilder_ == null) { + return data_.get(index); + } else { + return dataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDataOrBuilderList() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(data_); + } + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder addDataBuilder() { + return internalGetDataFieldBuilder() + .addBuilder(com.google.protobuf.Struct.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder addDataBuilder(int index) { + return internalGetDataFieldBuilder() + .addBuilder(index, com.google.protobuf.Struct.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The content of the data. Each row is a struct that matches the
+     * schema. Simple values are represented as strings, while nested structures
+     * are represented as lists or structs.
+     * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDataBuilderList() { + return internalGetDataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + data_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + data_ = null; + } + return dataBuilder_; + } + + private java.util.List formattedData_ = + java.util.Collections.emptyList(); + + private void ensureFormattedDataIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + formattedData_ = new java.util.ArrayList(formattedData_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + formattedDataBuilder_; + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFormattedDataList() { + if (formattedDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(formattedData_); + } else { + return formattedDataBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFormattedDataCount() { + if (formattedDataBuilder_ == null) { + return formattedData_.size(); + } else { + return formattedDataBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct getFormattedData(int index) { + if (formattedDataBuilder_ == null) { + return formattedData_.get(index); + } else { + return formattedDataBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFormattedData(int index, com.google.protobuf.Struct value) { + if (formattedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormattedDataIsMutable(); + formattedData_.set(index, value); + onChanged(); + } else { + formattedDataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFormattedData(int index, com.google.protobuf.Struct.Builder builderForValue) { + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + formattedData_.set(index, builderForValue.build()); + onChanged(); + } else { + formattedDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFormattedData(com.google.protobuf.Struct value) { + if (formattedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormattedDataIsMutable(); + formattedData_.add(value); + onChanged(); + } else { + formattedDataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFormattedData(int index, com.google.protobuf.Struct value) { + if (formattedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormattedDataIsMutable(); + formattedData_.add(index, value); + onChanged(); + } else { + formattedDataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFormattedData(com.google.protobuf.Struct.Builder builderForValue) { + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + formattedData_.add(builderForValue.build()); + onChanged(); + } else { + formattedDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFormattedData(int index, com.google.protobuf.Struct.Builder builderForValue) { + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + formattedData_.add(index, builderForValue.build()); + onChanged(); + } else { + formattedDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFormattedData( + java.lang.Iterable values) { + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, formattedData_); + onChanged(); + } else { + formattedDataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFormattedData() { + if (formattedDataBuilder_ == null) { + formattedData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + formattedDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFormattedData(int index) { + if (formattedDataBuilder_ == null) { + ensureFormattedDataIsMutable(); + formattedData_.remove(index); + onChanged(); + } else { + formattedDataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getFormattedDataBuilder(int index) { + return internalGetFormattedDataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getFormattedDataOrBuilder(int index) { + if (formattedDataBuilder_ == null) { + return formattedData_.get(index); + } else { + return formattedDataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFormattedDataOrBuilderList() { + if (formattedDataBuilder_ != null) { + return formattedDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(formattedData_); + } + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder addFormattedDataBuilder() { + return internalGetFormattedDataFieldBuilder() + .addBuilder(com.google.protobuf.Struct.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder addFormattedDataBuilder(int index) { + return internalGetFormattedDataFieldBuilder() + .addBuilder(index, com.google.protobuf.Struct.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Formatted representation of the data, when applicable.
+     * Each row is a struct that directly corresponds to the row at the same index
+     * within the `data` field. Its values are string representations of the
+     * original data, formatted according to data source specifications (e.g.,
+     * "$1,234.56" for currency). Columns without formatting will default to
+     * their raw value representation. If no columns have formatting rules, this
+     * field will be empty.
+     * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFormattedDataBuilderList() { + return internalGetFormattedDataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetFormattedDataFieldBuilder() { + if (formattedDataBuilder_ == null) { + formattedDataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + formattedData_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + formattedData_ = null; + } + return formattedDataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DataResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DataResult) + private static final com.google.cloud.geminidataanalytics.v1.DataResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DataResult(); + } + + public static com.google.cloud.geminidataanalytics.v1.DataResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DataResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResultOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResultOrBuilder.java new file mode 100644 index 000000000000..f7a1d5f06160 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DataResultOrBuilder.java @@ -0,0 +1,272 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DataResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DataResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A snake-case name for the data result that reflects its contents.
+   * The name is used to pass the result around by reference, and serves as a
+   * signal about its meaning.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. A snake-case name for the data result that reflects its contents.
+   * The name is used to pass the result around by reference, and serves as a
+   * signal about its meaning.
+   *
+   * * Example: "total_sales_by_product"
+   * * Example: "sales_for_product_12345"
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.Schema getSchema(); + + /** + * + * + *
+   * Optional. The schema of the data.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getDataList(); + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Struct getData(int index); + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDataCount(); + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getDataOrBuilderList(); + + /** + * + * + *
+   * Optional. The content of the data. Each row is a struct that matches the
+   * schema. Simple values are represented as strings, while nested structures
+   * are represented as lists or structs.
+   * 
+ * + * repeated .google.protobuf.Struct data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getDataOrBuilder(int index); + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFormattedDataList(); + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Struct getFormattedData(int index); + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFormattedDataCount(); + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFormattedDataOrBuilderList(); + + /** + * + * + *
+   * Optional. Formatted representation of the data, when applicable.
+   * Each row is a struct that directly corresponds to the row at the same index
+   * within the `data` field. Its values are string representations of the
+   * original data, formatted according to data source specifications (e.g.,
+   * "$1,234.56" for currency). Columns without formatting will default to
+   * their raw value representation. If no columns have formatting rules, this
+   * field will be empty.
+   * 
+ * + * + * repeated .google.protobuf.Struct formatted_data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getFormattedDataOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Datasource.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Datasource.java new file mode 100644 index 000000000000..b1127842991c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Datasource.java @@ -0,0 +1,2433 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A datasource that can be used to answer questions.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Datasource} + */ +@com.google.protobuf.Generated +public final class Datasource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Datasource) + DatasourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Datasource"); + } + + // Use Datasource.newBuilder() to construct. + private Datasource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Datasource() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Datasource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Datasource.class, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder.class); + } + + private int bitField0_; + private int referenceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reference_; + + public enum ReferenceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BIGQUERY_TABLE_REFERENCE(1), + STUDIO_DATASOURCE_ID(2), + LOOKER_EXPLORE_REFERENCE(4), + BIGQUERY_PROPERTY_GRAPH_REFERENCE(16), + REFERENCE_NOT_SET(0); + private final int value; + + private ReferenceCase(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 ReferenceCase valueOf(int value) { + return forNumber(value); + } + + public static ReferenceCase forNumber(int value) { + switch (value) { + case 1: + return BIGQUERY_TABLE_REFERENCE; + case 2: + return STUDIO_DATASOURCE_ID; + case 4: + return LOOKER_EXPLORE_REFERENCE; + case 16: + return BIGQUERY_PROPERTY_GRAPH_REFERENCE; + case 0: + return REFERENCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReferenceCase getReferenceCase() { + return ReferenceCase.forNumber(referenceCase_); + } + + public static final int BIGQUERY_TABLE_REFERENCE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return Whether the bigqueryTableReference field is set. + */ + @java.lang.Override + public boolean hasBigqueryTableReference() { + return referenceCase_ == 1; + } + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return The bigqueryTableReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + getBigqueryTableReference() { + if (referenceCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getBigqueryTableReferenceOrBuilder() { + if (referenceCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + + public static final int STUDIO_DATASOURCE_ID_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return Whether the studioDatasourceId field is set. + */ + public boolean hasStudioDatasourceId() { + return referenceCase_ == 2; + } + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return The studioDatasourceId. + */ + public java.lang.String getStudioDatasourceId() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + 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 (referenceCase_ == 2) { + reference_ = s; + } + return s; + } + } + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return The bytes for studioDatasourceId. + */ + public com.google.protobuf.ByteString getStudioDatasourceIdBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 2) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOOKER_EXPLORE_REFERENCE_FIELD_NUMBER = 4; + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return Whether the lookerExploreReference field is set. + */ + @java.lang.Override + public boolean hasLookerExploreReference() { + return referenceCase_ == 4; + } + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return The lookerExploreReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference + getLookerExploreReference() { + if (referenceCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getLookerExploreReferenceOrBuilder() { + if (referenceCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + + public static final int BIGQUERY_PROPERTY_GRAPH_REFERENCE_FIELD_NUMBER = 16; + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return Whether the bigqueryPropertyGraphReference field is set. + */ + @java.lang.Override + public boolean hasBigqueryPropertyGraphReference() { + return referenceCase_ == 16; + } + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return The bigqueryPropertyGraphReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + getBigqueryPropertyGraphReference() { + if (referenceCase_ == 16) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder + getBigqueryPropertyGraphReferenceOrBuilder() { + if (referenceCase_ == 16) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + + public static final int SCHEMA_FIELD_NUMBER = 7; + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + public static final int STRUCT_SCHEMA_FIELD_NUMBER = 10; + private com.google.protobuf.Struct structSchema_; + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the structSchema field is set. + */ + @java.lang.Override + public boolean hasStructSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructSchema() { + return structSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structSchema_; + } + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder() { + return structSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structSchema_; + } + + 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 (referenceCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_); + } + if (referenceCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, reference_); + } + if (referenceCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getStructSchema()); + } + if (referenceCase_ == 16) { + output.writeMessage( + 16, (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) reference_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (referenceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_); + } + if (referenceCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, reference_); + } + if (referenceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getStructSchema()); + } + if (referenceCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, + (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) reference_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Datasource)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Datasource other = + (com.google.cloud.geminidataanalytics.v1.Datasource) obj; + + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (hasStructSchema() != other.hasStructSchema()) return false; + if (hasStructSchema()) { + if (!getStructSchema().equals(other.getStructSchema())) return false; + } + if (!getReferenceCase().equals(other.getReferenceCase())) return false; + switch (referenceCase_) { + case 1: + if (!getBigqueryTableReference().equals(other.getBigqueryTableReference())) return false; + break; + case 2: + if (!getStudioDatasourceId().equals(other.getStudioDatasourceId())) return false; + break; + case 4: + if (!getLookerExploreReference().equals(other.getLookerExploreReference())) return false; + break; + case 16: + if (!getBigqueryPropertyGraphReference().equals(other.getBigqueryPropertyGraphReference())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (hasStructSchema()) { + hash = (37 * hash) + STRUCT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getStructSchema().hashCode(); + } + switch (referenceCase_) { + case 1: + hash = (37 * hash) + BIGQUERY_TABLE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryTableReference().hashCode(); + break; + case 2: + hash = (37 * hash) + STUDIO_DATASOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getStudioDatasourceId().hashCode(); + break; + case 4: + hash = (37 * hash) + LOOKER_EXPLORE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getLookerExploreReference().hashCode(); + break; + case 16: + hash = (37 * hash) + BIGQUERY_PROPERTY_GRAPH_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryPropertyGraphReference().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource 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.geminidataanalytics.v1.Datasource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource 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.geminidataanalytics.v1.Datasource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Datasource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A datasource that can be used to answer questions.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Datasource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Datasource) + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Datasource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Datasource.class, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Datasource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); + internalGetStructSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigqueryTableReferenceBuilder_ != null) { + bigqueryTableReferenceBuilder_.clear(); + } + if (lookerExploreReferenceBuilder_ != null) { + lookerExploreReferenceBuilder_.clear(); + } + if (bigqueryPropertyGraphReferenceBuilder_ != null) { + bigqueryPropertyGraphReferenceBuilder_.clear(); + } + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + structSchema_ = null; + if (structSchemaBuilder_ != null) { + structSchemaBuilder_.dispose(); + structSchemaBuilder_ = null; + } + referenceCase_ = 0; + reference_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Datasource getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Datasource build() { + com.google.cloud.geminidataanalytics.v1.Datasource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Datasource buildPartial() { + com.google.cloud.geminidataanalytics.v1.Datasource result = + new com.google.cloud.geminidataanalytics.v1.Datasource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Datasource result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.structSchema_ = + structSchemaBuilder_ == null ? structSchema_ : structSchemaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.Datasource result) { + result.referenceCase_ = referenceCase_; + result.reference_ = this.reference_; + if (referenceCase_ == 1 && bigqueryTableReferenceBuilder_ != null) { + result.reference_ = bigqueryTableReferenceBuilder_.build(); + } + if (referenceCase_ == 4 && lookerExploreReferenceBuilder_ != null) { + result.reference_ = lookerExploreReferenceBuilder_.build(); + } + if (referenceCase_ == 16 && bigqueryPropertyGraphReferenceBuilder_ != null) { + result.reference_ = bigqueryPropertyGraphReferenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Datasource) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Datasource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Datasource other) { + if (other == com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance()) + return this; + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.hasStructSchema()) { + mergeStructSchema(other.getStructSchema()); + } + switch (other.getReferenceCase()) { + case BIGQUERY_TABLE_REFERENCE: + { + mergeBigqueryTableReference(other.getBigqueryTableReference()); + break; + } + case STUDIO_DATASOURCE_ID: + { + referenceCase_ = 2; + reference_ = other.reference_; + onChanged(); + break; + } + case LOOKER_EXPLORE_REFERENCE: + { + mergeLookerExploreReference(other.getLookerExploreReference()); + break; + } + case BIGQUERY_PROPERTY_GRAPH_REFERENCE: + { + mergeBigqueryPropertyGraphReference(other.getBigqueryPropertyGraphReference()); + break; + } + case REFERENCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetBigqueryTableReferenceFieldBuilder().getBuilder(), + extensionRegistry); + referenceCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + referenceCase_ = 2; + reference_ = s; + break; + } // case 18 + case 34: + { + input.readMessage( + internalGetLookerExploreReferenceFieldBuilder().getBuilder(), + extensionRegistry); + referenceCase_ = 4; + break; + } // case 34 + case 58: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 + case 82: + { + input.readMessage( + internalGetStructSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + case 130: + { + input.readMessage( + internalGetBigqueryPropertyGraphReferenceFieldBuilder().getBuilder(), + extensionRegistry); + referenceCase_ = 16; + break; + } // case 130 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int referenceCase_ = 0; + private java.lang.Object reference_; + + public ReferenceCase getReferenceCase() { + return ReferenceCase.forNumber(referenceCase_); + } + + public Builder clearReference() { + referenceCase_ = 0; + reference_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + bigqueryTableReferenceBuilder_; + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return Whether the bigqueryTableReference field is set. + */ + @java.lang.Override + public boolean hasBigqueryTableReference() { + return referenceCase_ == 1; + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return The bigqueryTableReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + getBigqueryTableReference() { + if (bigqueryTableReferenceBuilder_ == null) { + if (referenceCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } else { + if (referenceCase_ == 1) { + return bigqueryTableReferenceBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + public Builder setBigqueryTableReference( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (bigqueryTableReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reference_ = value; + onChanged(); + } else { + bigqueryTableReferenceBuilder_.setMessage(value); + } + referenceCase_ = 1; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + public Builder setBigqueryTableReference( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder builderForValue) { + if (bigqueryTableReferenceBuilder_ == null) { + reference_ = builderForValue.build(); + onChanged(); + } else { + bigqueryTableReferenceBuilder_.setMessage(builderForValue.build()); + } + referenceCase_ = 1; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + public Builder mergeBigqueryTableReference( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference value) { + if (bigqueryTableReferenceBuilder_ == null) { + if (referenceCase_ == 1 + && reference_ + != com.google.cloud.geminidataanalytics.v1.BigQueryTableReference + .getDefaultInstance()) { + reference_ = + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.newBuilder( + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_) + .mergeFrom(value) + .buildPartial(); + } else { + reference_ = value; + } + onChanged(); + } else { + if (referenceCase_ == 1) { + bigqueryTableReferenceBuilder_.mergeFrom(value); + } else { + bigqueryTableReferenceBuilder_.setMessage(value); + } + } + referenceCase_ = 1; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + public Builder clearBigqueryTableReference() { + if (bigqueryTableReferenceBuilder_ == null) { + if (referenceCase_ == 1) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + } else { + if (referenceCase_ == 1) { + referenceCase_ = 0; + reference_ = null; + } + bigqueryTableReferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder + getBigqueryTableReferenceBuilder() { + return internalGetBigqueryTableReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getBigqueryTableReferenceOrBuilder() { + if ((referenceCase_ == 1) && (bigqueryTableReferenceBuilder_ != null)) { + return bigqueryTableReferenceBuilder_.getMessageOrBuilder(); + } else { + if (referenceCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a BigQuery table.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder> + internalGetBigqueryTableReferenceFieldBuilder() { + if (bigqueryTableReferenceBuilder_ == null) { + if (!(referenceCase_ == 1)) { + reference_ = + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.getDefaultInstance(); + } + bigqueryTableReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReference) reference_, + getParentForChildren(), + isClean()); + reference_ = null; + } + referenceCase_ = 1; + onChanged(); + return bigqueryTableReferenceBuilder_; + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @return Whether the studioDatasourceId field is set. + */ + @java.lang.Override + public boolean hasStudioDatasourceId() { + return referenceCase_ == 2; + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @return The studioDatasourceId. + */ + @java.lang.Override + public java.lang.String getStudioDatasourceId() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (referenceCase_ == 2) { + reference_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @return The bytes for studioDatasourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStudioDatasourceIdBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 2) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @param value The studioDatasourceId to set. + * @return This builder for chaining. + */ + public Builder setStudioDatasourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + referenceCase_ = 2; + reference_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearStudioDatasourceId() { + if (referenceCase_ == 2) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A reference to a Looker Studio datasource.
+     * 
+ * + * string studio_datasource_id = 2; + * + * @param value The bytes for studioDatasourceId to set. + * @return This builder for chaining. + */ + public Builder setStudioDatasourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + referenceCase_ = 2; + reference_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + lookerExploreReferenceBuilder_; + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return Whether the lookerExploreReference field is set. + */ + @java.lang.Override + public boolean hasLookerExploreReference() { + return referenceCase_ == 4; + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return The lookerExploreReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference + getLookerExploreReference() { + if (lookerExploreReferenceBuilder_ == null) { + if (referenceCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } else { + if (referenceCase_ == 4) { + return lookerExploreReferenceBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + public Builder setLookerExploreReference( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference value) { + if (lookerExploreReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reference_ = value; + onChanged(); + } else { + lookerExploreReferenceBuilder_.setMessage(value); + } + referenceCase_ = 4; + return this; + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + public Builder setLookerExploreReference( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder builderForValue) { + if (lookerExploreReferenceBuilder_ == null) { + reference_ = builderForValue.build(); + onChanged(); + } else { + lookerExploreReferenceBuilder_.setMessage(builderForValue.build()); + } + referenceCase_ = 4; + return this; + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + public Builder mergeLookerExploreReference( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference value) { + if (lookerExploreReferenceBuilder_ == null) { + if (referenceCase_ == 4 + && reference_ + != com.google.cloud.geminidataanalytics.v1.LookerExploreReference + .getDefaultInstance()) { + reference_ = + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.newBuilder( + (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_) + .mergeFrom(value) + .buildPartial(); + } else { + reference_ = value; + } + onChanged(); + } else { + if (referenceCase_ == 4) { + lookerExploreReferenceBuilder_.mergeFrom(value); + } else { + lookerExploreReferenceBuilder_.setMessage(value); + } + } + referenceCase_ = 4; + return this; + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + public Builder clearLookerExploreReference() { + if (lookerExploreReferenceBuilder_ == null) { + if (referenceCase_ == 4) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + } else { + if (referenceCase_ == 4) { + referenceCase_ = 0; + reference_ = null; + } + lookerExploreReferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder + getLookerExploreReferenceBuilder() { + return internalGetLookerExploreReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getLookerExploreReferenceOrBuilder() { + if ((referenceCase_ == 4) && (lookerExploreReferenceBuilder_ != null)) { + return lookerExploreReferenceBuilder_.getMessageOrBuilder(); + } else { + if (referenceCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a Looker explore.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + internalGetLookerExploreReferenceFieldBuilder() { + if (lookerExploreReferenceBuilder_ == null) { + if (!(referenceCase_ == 4)) { + reference_ = + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + lookerExploreReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) reference_, + getParentForChildren(), + isClean()); + reference_ = null; + } + referenceCase_ = 4; + onChanged(); + return lookerExploreReferenceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder> + bigqueryPropertyGraphReferenceBuilder_; + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return Whether the bigqueryPropertyGraphReference field is set. + */ + @java.lang.Override + public boolean hasBigqueryPropertyGraphReference() { + return referenceCase_ == 16; + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return The bigqueryPropertyGraphReference. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + getBigqueryPropertyGraphReference() { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + if (referenceCase_ == 16) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } else { + if (referenceCase_ == 16) { + return bigqueryPropertyGraphReferenceBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + public Builder setBigqueryPropertyGraphReference( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference value) { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reference_ = value; + onChanged(); + } else { + bigqueryPropertyGraphReferenceBuilder_.setMessage(value); + } + referenceCase_ = 16; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + public Builder setBigqueryPropertyGraphReference( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder + builderForValue) { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + reference_ = builderForValue.build(); + onChanged(); + } else { + bigqueryPropertyGraphReferenceBuilder_.setMessage(builderForValue.build()); + } + referenceCase_ = 16; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + public Builder mergeBigqueryPropertyGraphReference( + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference value) { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + if (referenceCase_ == 16 + && reference_ + != com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance()) { + reference_ = + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.newBuilder( + (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + reference_) + .mergeFrom(value) + .buildPartial(); + } else { + reference_ = value; + } + onChanged(); + } else { + if (referenceCase_ == 16) { + bigqueryPropertyGraphReferenceBuilder_.mergeFrom(value); + } else { + bigqueryPropertyGraphReferenceBuilder_.setMessage(value); + } + } + referenceCase_ = 16; + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + public Builder clearBigqueryPropertyGraphReference() { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + if (referenceCase_ == 16) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + } else { + if (referenceCase_ == 16) { + referenceCase_ = 0; + reference_ = null; + } + bigqueryPropertyGraphReferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder + getBigqueryPropertyGraphReferenceBuilder() { + return internalGetBigqueryPropertyGraphReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder + getBigqueryPropertyGraphReferenceOrBuilder() { + if ((referenceCase_ == 16) && (bigqueryPropertyGraphReferenceBuilder_ != null)) { + return bigqueryPropertyGraphReferenceBuilder_.getMessageOrBuilder(); + } else { + if (referenceCase_ == 16) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) + reference_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A reference to a BigQuery property graph.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder> + internalGetBigqueryPropertyGraphReferenceFieldBuilder() { + if (bigqueryPropertyGraphReferenceBuilder_ == null) { + if (!(referenceCase_ == 16)) { + reference_ = + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + .getDefaultInstance(); + } + bigqueryPropertyGraphReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference) reference_, + getParentForChildren(), + isClean()); + reference_ = null; + } + referenceCase_ = 16; + onChanged(); + return bigqueryPropertyGraphReferenceBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && schema_ != null + && schema_ != com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000010); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private com.google.protobuf.Struct structSchema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structSchemaBuilder_; + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the structSchema field is set. + */ + public boolean hasStructSchema() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structSchema. + */ + public com.google.protobuf.Struct getStructSchema() { + if (structSchemaBuilder_ == null) { + return structSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structSchema_; + } else { + return structSchemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStructSchema(com.google.protobuf.Struct value) { + if (structSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structSchema_ = value; + } else { + structSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStructSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (structSchemaBuilder_ == null) { + structSchema_ = builderForValue.build(); + } else { + structSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStructSchema(com.google.protobuf.Struct value) { + if (structSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && structSchema_ != null + && structSchema_ != com.google.protobuf.Struct.getDefaultInstance()) { + getStructSchemaBuilder().mergeFrom(value); + } else { + structSchema_ = value; + } + } else { + structSchemaBuilder_.mergeFrom(value); + } + if (structSchema_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStructSchema() { + bitField0_ = (bitField0_ & ~0x00000020); + structSchema_ = null; + if (structSchemaBuilder_ != null) { + structSchemaBuilder_.dispose(); + structSchemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getStructSchemaBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetStructSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder() { + if (structSchemaBuilder_ != null) { + return structSchemaBuilder_.getMessageOrBuilder(); + } else { + return structSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structSchema_; + } + } + + /** + * + * + *
+     * Optional. A struct representation of the schema.
+     * This is populated for datasources with schemas that cannot be
+     * fully represented by the strongly-typed `schema` field.
+     *
+     * For Looker datasources, this maps to the LookmlModelExplore type:
+     * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+     * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetStructSchemaFieldBuilder() { + if (structSchemaBuilder_ == null) { + structSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getStructSchema(), getParentForChildren(), isClean()); + structSchema_ = null; + } + return structSchemaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Datasource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Datasource) + private static final com.google.cloud.geminidataanalytics.v1.Datasource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Datasource(); + } + + public static com.google.cloud.geminidataanalytics.v1.Datasource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Datasource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Datasource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptions.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptions.java new file mode 100644 index 000000000000..9896b2a9b71f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptions.java @@ -0,0 +1,765 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Options for datasources configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DatasourceOptions} + */ +@com.google.protobuf.Generated +public final class DatasourceOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DatasourceOptions) + DatasourceOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DatasourceOptions"); + } + + // Use DatasourceOptions.newBuilder() to construct. + private DatasourceOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DatasourceOptions() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.class, + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder.class); + } + + private int bitField0_; + public static final int BIG_QUERY_MAX_BILLED_BYTES_FIELD_NUMBER = 1; + private com.google.protobuf.Int64Value bigQueryMaxBilledBytes_; + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQueryMaxBilledBytes field is set. + */ + @java.lang.Override + public boolean hasBigQueryMaxBilledBytes() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQueryMaxBilledBytes. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getBigQueryMaxBilledBytes() { + return bigQueryMaxBilledBytes_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : bigQueryMaxBilledBytes_; + } + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getBigQueryMaxBilledBytesOrBuilder() { + return bigQueryMaxBilledBytes_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : bigQueryMaxBilledBytes_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBigQueryMaxBilledBytes()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigQueryMaxBilledBytes()); + } + size += getUnknownFields().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.geminidataanalytics.v1.DatasourceOptions)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DatasourceOptions other = + (com.google.cloud.geminidataanalytics.v1.DatasourceOptions) obj; + + if (hasBigQueryMaxBilledBytes() != other.hasBigQueryMaxBilledBytes()) return false; + if (hasBigQueryMaxBilledBytes()) { + if (!getBigQueryMaxBilledBytes().equals(other.getBigQueryMaxBilledBytes())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBigQueryMaxBilledBytes()) { + hash = (37 * hash) + BIG_QUERY_MAX_BILLED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryMaxBilledBytes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions 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.geminidataanalytics.v1.DatasourceOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions 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.geminidataanalytics.v1.DatasourceOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DatasourceOptions 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Options for datasources configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DatasourceOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DatasourceOptions) + com.google.cloud.geminidataanalytics.v1.DatasourceOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.class, + com.google.cloud.geminidataanalytics.v1.DatasourceOptions.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DatasourceOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBigQueryMaxBilledBytesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigQueryMaxBilledBytes_ = null; + if (bigQueryMaxBilledBytesBuilder_ != null) { + bigQueryMaxBilledBytesBuilder_.dispose(); + bigQueryMaxBilledBytesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions build() { + com.google.cloud.geminidataanalytics.v1.DatasourceOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOptions buildPartial() { + com.google.cloud.geminidataanalytics.v1.DatasourceOptions result = + new com.google.cloud.geminidataanalytics.v1.DatasourceOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.DatasourceOptions result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigQueryMaxBilledBytes_ = + bigQueryMaxBilledBytesBuilder_ == null + ? bigQueryMaxBilledBytes_ + : bigQueryMaxBilledBytesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DatasourceOptions) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DatasourceOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DatasourceOptions other) { + if (other == com.google.cloud.geminidataanalytics.v1.DatasourceOptions.getDefaultInstance()) + return this; + if (other.hasBigQueryMaxBilledBytes()) { + mergeBigQueryMaxBilledBytes(other.getBigQueryMaxBilledBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetBigQueryMaxBilledBytesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Int64Value bigQueryMaxBilledBytes_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + bigQueryMaxBilledBytesBuilder_; + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQueryMaxBilledBytes field is set. + */ + public boolean hasBigQueryMaxBilledBytes() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQueryMaxBilledBytes. + */ + public com.google.protobuf.Int64Value getBigQueryMaxBilledBytes() { + if (bigQueryMaxBilledBytesBuilder_ == null) { + return bigQueryMaxBilledBytes_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : bigQueryMaxBilledBytes_; + } else { + return bigQueryMaxBilledBytesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigQueryMaxBilledBytes(com.google.protobuf.Int64Value value) { + if (bigQueryMaxBilledBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigQueryMaxBilledBytes_ = value; + } else { + bigQueryMaxBilledBytesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigQueryMaxBilledBytes( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (bigQueryMaxBilledBytesBuilder_ == null) { + bigQueryMaxBilledBytes_ = builderForValue.build(); + } else { + bigQueryMaxBilledBytesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBigQueryMaxBilledBytes(com.google.protobuf.Int64Value value) { + if (bigQueryMaxBilledBytesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigQueryMaxBilledBytes_ != null + && bigQueryMaxBilledBytes_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getBigQueryMaxBilledBytesBuilder().mergeFrom(value); + } else { + bigQueryMaxBilledBytes_ = value; + } + } else { + bigQueryMaxBilledBytesBuilder_.mergeFrom(value); + } + if (bigQueryMaxBilledBytes_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBigQueryMaxBilledBytes() { + bitField0_ = (bitField0_ & ~0x00000001); + bigQueryMaxBilledBytes_ = null; + if (bigQueryMaxBilledBytesBuilder_ != null) { + bigQueryMaxBilledBytesBuilder_.dispose(); + bigQueryMaxBilledBytesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getBigQueryMaxBilledBytesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBigQueryMaxBilledBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getBigQueryMaxBilledBytesOrBuilder() { + if (bigQueryMaxBilledBytesBuilder_ != null) { + return bigQueryMaxBilledBytesBuilder_.getMessageOrBuilder(); + } else { + return bigQueryMaxBilledBytes_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : bigQueryMaxBilledBytes_; + } + } + + /** + * + * + *
+     * Optional. This option applies to datasources that require BigQuery queries
+     * only. Limits the bytes billed for each BQ query job. Queries that will have
+     * bytes billed beyond this limit will fail (without incurring a charge).
+     * If unspecified, no limit will be applied.
+     * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + internalGetBigQueryMaxBilledBytesFieldBuilder() { + if (bigQueryMaxBilledBytesBuilder_ == null) { + bigQueryMaxBilledBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getBigQueryMaxBilledBytes(), getParentForChildren(), isClean()); + bigQueryMaxBilledBytes_ = null; + } + return bigQueryMaxBilledBytesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DatasourceOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DatasourceOptions) + private static final com.google.cloud.geminidataanalytics.v1.DatasourceOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DatasourceOptions(); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatasourceOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DatasourceOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptionsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptionsOrBuilder.java new file mode 100644 index 000000000000..8f0ca24ac517 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOptionsOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DatasourceOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DatasourceOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQueryMaxBilledBytes field is set. + */ + boolean hasBigQueryMaxBilledBytes(); + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQueryMaxBilledBytes. + */ + com.google.protobuf.Int64Value getBigQueryMaxBilledBytes(); + + /** + * + * + *
+   * Optional. This option applies to datasources that require BigQuery queries
+   * only. Limits the bytes billed for each BQ query job. Queries that will have
+   * bytes billed beyond this limit will fail (without incurring a charge).
+   * If unspecified, no limit will be applied.
+   * 
+ * + * + * .google.protobuf.Int64Value big_query_max_billed_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getBigQueryMaxBilledBytesOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOrBuilder.java new file mode 100644 index 000000000000..6cb0e15e5d7d --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceOrBuilder.java @@ -0,0 +1,294 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DatasourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Datasource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return Whether the bigqueryTableReference field is set. + */ + boolean hasBigqueryTableReference(); + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + * + * @return The bigqueryTableReference. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReference getBigqueryTableReference(); + + /** + * + * + *
+   * A reference to a BigQuery table.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReference bigquery_table_reference = 1; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceOrBuilder + getBigqueryTableReferenceOrBuilder(); + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return Whether the studioDatasourceId field is set. + */ + boolean hasStudioDatasourceId(); + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return The studioDatasourceId. + */ + java.lang.String getStudioDatasourceId(); + + /** + * + * + *
+   * A reference to a Looker Studio datasource.
+   * 
+ * + * string studio_datasource_id = 2; + * + * @return The bytes for studioDatasourceId. + */ + com.google.protobuf.ByteString getStudioDatasourceIdBytes(); + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return Whether the lookerExploreReference field is set. + */ + boolean hasLookerExploreReference(); + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + * + * @return The lookerExploreReference. + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReference getLookerExploreReference(); + + /** + * + * + *
+   * A reference to a Looker explore.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReference looker_explore_reference = 4; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getLookerExploreReferenceOrBuilder(); + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return Whether the bigqueryPropertyGraphReference field is set. + */ + boolean hasBigqueryPropertyGraphReference(); + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + * + * @return The bigqueryPropertyGraphReference. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference + getBigqueryPropertyGraphReference(); + + /** + * + * + *
+   * A reference to a BigQuery property graph.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + * + */ + com.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceOrBuilder + getBigqueryPropertyGraphReferenceOrBuilder(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.Schema getSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the structSchema field is set. + */ + boolean hasStructSchema(); + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structSchema. + */ + com.google.protobuf.Struct getStructSchema(); + + /** + * + * + *
+   * Optional. A struct representation of the schema.
+   * This is populated for datasources with schemas that cannot be
+   * fully represented by the strongly-typed `schema` field.
+   *
+   * For Looker datasources, this maps to the LookmlModelExplore type:
+   * https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
+   * 
+ * + * .google.protobuf.Struct struct_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.Datasource.ReferenceCase getReferenceCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceProto.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceProto.java new file mode 100644 index 000000000000..db9eac47bd9b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceProto.java @@ -0,0 +1,340 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public final class DatasourceProto extends com.google.protobuf.GeneratedFile { + private DatasourceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DatasourceProto"); + } + + 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_geminidataanalytics_v1_DatasourceReferences_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Datasource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_Field_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_geminidataanalytics_v1_DataFilter_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" + + "4google/cloud/geminidataanalytics/v1/datasource.proto\022#google.cloud.geminidataa" + + "nalytics.v1\032\037google/api/field_behavior.proto\032\034google/protobuf/struct.proto\"\223\002\n" + + "\024DatasourceReferences\022J\n" + + "\002bq\030\001 \001(\0132<.google" + + ".cloud.geminidataanalytics.v1.BigQueryTableReferencesH\000\022Q\n" + + "\006studio\030\002 \001(\0132?.google" + + ".cloud.geminidataanalytics.v1.StudioDatasourceReferencesH\000\022N\n" + + "\006looker\030\003 \001(\0132<.goo" + + "gle.cloud.geminidataanalytics.v1.LookerExploreReferencesH\000B\014\n\n" + + "references\"u\n" + + "\027BigQueryTableReferences\022Z\n" + + "\020table_references\030\001" + + " \003(\0132;.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceB\003\340A\001\"\243\001\n" + + "\026BigQueryTableReference\022\027\n\n" + + "project_id\030\001 \001(\tB\003\340A\002\022\027\n\n" + + "dataset_id\030\003 \001(\tB\003\340A\002\022\025\n" + + "\010table_id\030\004 \001(\tB\003\340A\002\022@\n" + + "\006schema\030\006" + + " \001(\0132+.google.cloud.geminidataanalytics.v1.SchemaB\003\340A\001\"|\n" + + "\032StudioDatasourceReferences\022^\n" + + "\021studio_references\030\002 \003(\0132>.google.cloud.geminidata" + + "analytics.v1.StudioDatasourceReferenceB\003\340A\001\"7\n" + + "\031StudioDatasourceReference\022\032\n\r" + + "datasource_id\030\001 \001(\tB\003\340A\002\"w\n" + + "\027LookerExploreReferences\022\\\n" + + "\022explore_references\030\001 \003(\0132;.go" + + "ogle.cloud.geminidataanalytics.v1.LookerExploreReferenceB\003\340A\002\"\236\002\n" + + "\026LookerExploreReference\022\035\n" + + "\023looker_instance_uri\030\t \001(\tH\000\022f\n" + + "\034private_looker_instance_info\030\n" + + " \001(\0132>." + + "google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoH\000\022\031\n" + + "\014lookml_model\030\004 \001(\tB\003\340A\002\022\024\n" + + "\007explore\030\005 \001(\tB\003\340A\002\022@\n" + + "\006schema\030\010" + + " \001(\0132+.google.cloud.geminidataanalytics.v1.SchemaB\003\340A\001B\n\n" + + "\010instance\"r\n" + + "\036BigQueryPropertyGraphReference\022\027\n\n" + + "project_id\030\001 \001(\tB\003\340A\002\022\027\n\n" + + "dataset_id\030\002 \001(\tB\003\340A\002\022\036\n" + + "\021property_graph_id\030\003 \001(\tB\003\340A\002\"W\n" + + "\031PrivateLookerInstanceInfo\022\032\n" + + "\022looker_instance_id\030\001 \001(\t\022\036\n" + + "\026service_directory_name\030\002 \001(\t\"\344\003\n\n" + + "Datasource\022_\n" + + "\030bigquery_table_reference\030\001" + + " \001(\0132;.google.cloud.geminidataanalytics.v1.BigQueryTableReferenceH\000\022\036\n" + + "\024studio_datasource_id\030\002 \001(\tH\000\022_\n" + + "\030looker_explore_reference\030\004" + + " \001(\0132;.google.cloud.geminidataanalytics.v1.LookerExploreReferenceH\000\022p\n" + + "!bigquery_property_graph_reference\030\020 \001(\0132" + + "C.google.cloud.geminidataanalytics.v1.BigQueryPropertyGraphReferenceH\000\022@\n" + + "\006schema\030\007" + + " \001(\0132+.google.cloud.geminidataanalytics.v1.SchemaB\003\340A\001\0223\n\r" + + "struct_schema\030\n" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001B\013\n" + + "\treference\"\357\001\n" + + "\006Schema\022?\n" + + "\006fields\030\001 \003(\0132*.google.c" + + "loud.geminidataanalytics.v1.FieldB\003\340A\001\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022\025\n" + + "\010synonyms\030\003 \003(\tB\003\340A\001\022\021\n" + + "\004tags\030\004 \003(\tB\003\340A\001\022\031\n" + + "\014display_name\030\005 \001(\tB\003\340A\001\022E\n" + + "\007filters\030\006 \003(\0132/.google." + + "cloud.geminidataanalytics.v1.DataFilterB\003\340A\001\"\225\002\n" + + "\005Field\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\001\022\021\n" + + "\004type\030\002 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\022\021\n" + + "\004mode\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010synonyms\030\006 \003(\tB\003\340A\001\022\021\n" + + "\004tags\030\007 \003(\tB\003\340A\001\022\031\n" + + "\014display_name\030\010 \001(\tB\003\340A\001\022B\n" + + "\tsubfields\030\t" + + " \003(\0132*.google.cloud.geminidataanalytics.v1.FieldB\003\340A\001\022\025\n" + + "\010category\030\n" + + " \001(\tB\003\340A\001\022\031\n" + + "\014value_format\030\013 \001(\tB\003\340A\001\"|\n\n" + + "DataFilter\022\022\n" + + "\005field\030\001 \001(\tB\003\340A\001\022\022\n" + + "\005value\030\002 \001(\tB\003\340A\001\022F\n" + + "\004type\030\003 \001(\01623.googl" + + "e.cloud.geminidataanalytics.v1.DataFilterTypeB\003\340A\001*E\n" + + "\016DataFilterType\022 \n" + + "\034DATA_FILTER_TYPE_UNSPECIFIED\020\000\022\021\n\r" + + "ALWAYS_FILTER\020\001B\214\002\n" + + "\'com.google.cloud.geminidataanalytics.v1B\017DatasourceProtoP\001ZYcloud.google.c" + + "om/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb\252\002#Go" + + "ogle.Cloud.GeminiDataAnalytics.V1\312\002#Goog" + + "le\\Cloud\\GeminiDataAnalytics\\V1\352\002&Google" + + "::Cloud::GeminiDataAnalytics::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_descriptor, + new java.lang.String[] { + "Bq", "Studio", "Looker", "References", + }); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReferences_descriptor, + new java.lang.String[] { + "TableReferences", + }); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_BigQueryTableReference_descriptor, + new java.lang.String[] { + "ProjectId", "DatasetId", "TableId", "Schema", + }); + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor, + new java.lang.String[] { + "StudioReferences", + }); + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor, + new java.lang.String[] { + "DatasourceId", + }); + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor, + new java.lang.String[] { + "ExploreReferences", + }); + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor, + new java.lang.String[] { + "LookerInstanceUri", + "PrivateLookerInstanceInfo", + "LookmlModel", + "Explore", + "Schema", + "Instance", + }); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_BigQueryPropertyGraphReference_descriptor, + new java.lang.String[] { + "ProjectId", "DatasetId", "PropertyGraphId", + }); + internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor, + new java.lang.String[] { + "LookerInstanceId", "ServiceDirectoryName", + }); + internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_geminidataanalytics_v1_Datasource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Datasource_descriptor, + new java.lang.String[] { + "BigqueryTableReference", + "StudioDatasourceId", + "LookerExploreReference", + "BigqueryPropertyGraphReference", + "Schema", + "StructSchema", + "Reference", + }); + internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_geminidataanalytics_v1_Schema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor, + new java.lang.String[] { + "Fields", "Description", "Synonyms", "Tags", "DisplayName", "Filters", + }); + internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_geminidataanalytics_v1_Field_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor, + new java.lang.String[] { + "Name", + "Type", + "Description", + "Mode", + "Synonyms", + "Tags", + "DisplayName", + "Subfields", + "Category", + "ValueFormat", + }); + internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_geminidataanalytics_v1_DataFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_geminidataanalytics_v1_DataFilter_descriptor, + new java.lang.String[] { + "Field", "Value", "Type", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferences.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferences.java new file mode 100644 index 000000000000..1fe5583945d7 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferences.java @@ -0,0 +1,1443 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A collection of references to datasources.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DatasourceReferences} + */ +@com.google.protobuf.Generated +public final class DatasourceReferences extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DatasourceReferences) + DatasourceReferencesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DatasourceReferences"); + } + + // Use DatasourceReferences.newBuilder() to construct. + private DatasourceReferences(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DatasourceReferences() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.class, + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder.class); + } + + private int referencesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object references_; + + public enum ReferencesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BQ(1), + STUDIO(2), + LOOKER(3), + REFERENCES_NOT_SET(0); + private final int value; + + private ReferencesCase(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 ReferencesCase valueOf(int value) { + return forNumber(value); + } + + public static ReferencesCase forNumber(int value) { + switch (value) { + case 1: + return BQ; + case 2: + return STUDIO; + case 3: + return LOOKER; + case 0: + return REFERENCES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReferencesCase getReferencesCase() { + return ReferencesCase.forNumber(referencesCase_); + } + + public static final int BQ_FIELD_NUMBER = 1; + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return Whether the bq field is set. + */ + @java.lang.Override + public boolean hasBq() { + return referencesCase_ == 1; + } + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return The bq. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences getBq() { + if (referencesCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder getBqOrBuilder() { + if (referencesCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + + public static final int STUDIO_FIELD_NUMBER = 2; + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return Whether the studio field is set. + */ + @java.lang.Override + public boolean hasStudio() { + return referencesCase_ == 2; + } + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return The studio. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences getStudio() { + if (referencesCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.getDefaultInstance(); + } + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder + getStudioOrBuilder() { + if (referencesCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.getDefaultInstance(); + } + + public static final int LOOKER_FIELD_NUMBER = 3; + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return Whether the looker field is set. + */ + @java.lang.Override + public boolean hasLooker() { + return referencesCase_ == 3; + } + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return The looker. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences getLooker() { + if (referencesCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder + getLookerOrBuilder() { + if (referencesCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.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 (referencesCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_); + } + if (referencesCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_); + } + if (referencesCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (referencesCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_); + } + if (referencesCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_); + } + if (referencesCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DatasourceReferences)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DatasourceReferences other = + (com.google.cloud.geminidataanalytics.v1.DatasourceReferences) obj; + + if (!getReferencesCase().equals(other.getReferencesCase())) return false; + switch (referencesCase_) { + case 1: + if (!getBq().equals(other.getBq())) return false; + break; + case 2: + if (!getStudio().equals(other.getStudio())) return false; + break; + case 3: + if (!getLooker().equals(other.getLooker())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (referencesCase_) { + case 1: + hash = (37 * hash) + BQ_FIELD_NUMBER; + hash = (53 * hash) + getBq().hashCode(); + break; + case 2: + hash = (37 * hash) + STUDIO_FIELD_NUMBER; + hash = (53 * hash) + getStudio().hashCode(); + break; + case 3: + hash = (37 * hash) + LOOKER_FIELD_NUMBER; + hash = (53 * hash) + getLooker().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences 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.geminidataanalytics.v1.DatasourceReferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences 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.geminidataanalytics.v1.DatasourceReferences parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DatasourceReferences 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of references to datasources.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DatasourceReferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DatasourceReferences) + com.google.cloud.geminidataanalytics.v1.DatasourceReferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.class, + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DatasourceReferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bqBuilder_ != null) { + bqBuilder_.clear(); + } + if (studioBuilder_ != null) { + studioBuilder_.clear(); + } + if (lookerBuilder_ != null) { + lookerBuilder_.clear(); + } + referencesCase_ = 0; + references_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_DatasourceReferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences build() { + com.google.cloud.geminidataanalytics.v1.DatasourceReferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceReferences buildPartial() { + com.google.cloud.geminidataanalytics.v1.DatasourceReferences result = + new com.google.cloud.geminidataanalytics.v1.DatasourceReferences(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.geminidataanalytics.v1.DatasourceReferences result) { + result.referencesCase_ = referencesCase_; + result.references_ = this.references_; + if (referencesCase_ == 1 && bqBuilder_ != null) { + result.references_ = bqBuilder_.build(); + } + if (referencesCase_ == 2 && studioBuilder_ != null) { + result.references_ = studioBuilder_.build(); + } + if (referencesCase_ == 3 && lookerBuilder_ != null) { + result.references_ = lookerBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DatasourceReferences) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DatasourceReferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DatasourceReferences other) { + if (other + == com.google.cloud.geminidataanalytics.v1.DatasourceReferences.getDefaultInstance()) + return this; + switch (other.getReferencesCase()) { + case BQ: + { + mergeBq(other.getBq()); + break; + } + case STUDIO: + { + mergeStudio(other.getStudio()); + break; + } + case LOOKER: + { + mergeLooker(other.getLooker()); + break; + } + case REFERENCES_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetBqFieldBuilder().getBuilder(), extensionRegistry); + referencesCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetStudioFieldBuilder().getBuilder(), extensionRegistry); + referencesCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetLookerFieldBuilder().getBuilder(), extensionRegistry); + referencesCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int referencesCase_ = 0; + private java.lang.Object references_; + + public ReferencesCase getReferencesCase() { + return ReferencesCase.forNumber(referencesCase_); + } + + public Builder clearReferences() { + referencesCase_ = 0; + references_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder> + bqBuilder_; + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return Whether the bq field is set. + */ + @java.lang.Override + public boolean hasBq() { + return referencesCase_ == 1; + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return The bq. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences getBq() { + if (bqBuilder_ == null) { + if (referencesCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } else { + if (referencesCase_ == 1) { + return bqBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + public Builder setBq(com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences value) { + if (bqBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + references_ = value; + onChanged(); + } else { + bqBuilder_.setMessage(value); + } + referencesCase_ = 1; + return this; + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + public Builder setBq( + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder builderForValue) { + if (bqBuilder_ == null) { + references_ = builderForValue.build(); + onChanged(); + } else { + bqBuilder_.setMessage(builderForValue.build()); + } + referencesCase_ = 1; + return this; + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + public Builder mergeBq(com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences value) { + if (bqBuilder_ == null) { + if (referencesCase_ == 1 + && references_ + != com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences + .getDefaultInstance()) { + references_ = + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.newBuilder( + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_) + .mergeFrom(value) + .buildPartial(); + } else { + references_ = value; + } + onChanged(); + } else { + if (referencesCase_ == 1) { + bqBuilder_.mergeFrom(value); + } else { + bqBuilder_.setMessage(value); + } + } + referencesCase_ = 1; + return this; + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + public Builder clearBq() { + if (bqBuilder_ == null) { + if (referencesCase_ == 1) { + referencesCase_ = 0; + references_ = null; + onChanged(); + } + } else { + if (referencesCase_ == 1) { + referencesCase_ = 0; + references_ = null; + } + bqBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder getBqBuilder() { + return internalGetBqFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder + getBqOrBuilder() { + if ((referencesCase_ == 1) && (bqBuilder_ != null)) { + return bqBuilder_.getMessageOrBuilder(); + } else { + if (referencesCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to BigQuery tables.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder> + internalGetBqFieldBuilder() { + if (bqBuilder_ == null) { + if (!(referencesCase_ == 1)) { + references_ = + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.getDefaultInstance(); + } + bqBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences) references_, + getParentForChildren(), + isClean()); + references_ = null; + } + referencesCase_ = 1; + onChanged(); + return bqBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder> + studioBuilder_; + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return Whether the studio field is set. + */ + @java.lang.Override + public boolean hasStudio() { + return referencesCase_ == 2; + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return The studio. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences getStudio() { + if (studioBuilder_ == null) { + if (referencesCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance(); + } else { + if (referencesCase_ == 2) { + return studioBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + public Builder setStudio( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences value) { + if (studioBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + references_ = value; + onChanged(); + } else { + studioBuilder_.setMessage(value); + } + referencesCase_ = 2; + return this; + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + public Builder setStudio( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder + builderForValue) { + if (studioBuilder_ == null) { + references_ = builderForValue.build(); + onChanged(); + } else { + studioBuilder_.setMessage(builderForValue.build()); + } + referencesCase_ = 2; + return this; + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + public Builder mergeStudio( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences value) { + if (studioBuilder_ == null) { + if (referencesCase_ == 2 + && references_ + != com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance()) { + references_ = + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.newBuilder( + (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + references_) + .mergeFrom(value) + .buildPartial(); + } else { + references_ = value; + } + onChanged(); + } else { + if (referencesCase_ == 2) { + studioBuilder_.mergeFrom(value); + } else { + studioBuilder_.setMessage(value); + } + } + referencesCase_ = 2; + return this; + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + public Builder clearStudio() { + if (studioBuilder_ == null) { + if (referencesCase_ == 2) { + referencesCase_ = 0; + references_ = null; + onChanged(); + } + } else { + if (referencesCase_ == 2) { + referencesCase_ = 0; + references_ = null; + } + studioBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder + getStudioBuilder() { + return internalGetStudioFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder + getStudioOrBuilder() { + if ((referencesCase_ == 2) && (studioBuilder_ != null)) { + return studioBuilder_.getMessageOrBuilder(); + } else { + if (referencesCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to Looker Studio datasources.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder> + internalGetStudioFieldBuilder() { + if (studioBuilder_ == null) { + if (!(referencesCase_ == 2)) { + references_ = + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance(); + } + studioBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) references_, + getParentForChildren(), + isClean()); + references_ = null; + } + referencesCase_ = 2; + onChanged(); + return studioBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder> + lookerBuilder_; + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return Whether the looker field is set. + */ + @java.lang.Override + public boolean hasLooker() { + return referencesCase_ == 3; + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return The looker. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences getLooker() { + if (lookerBuilder_ == null) { + if (referencesCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } else { + if (referencesCase_ == 3) { + return lookerBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + public Builder setLooker( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences value) { + if (lookerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + references_ = value; + onChanged(); + } else { + lookerBuilder_.setMessage(value); + } + referencesCase_ = 3; + return this; + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + public Builder setLooker( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder builderForValue) { + if (lookerBuilder_ == null) { + references_ = builderForValue.build(); + onChanged(); + } else { + lookerBuilder_.setMessage(builderForValue.build()); + } + referencesCase_ = 3; + return this; + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + public Builder mergeLooker( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences value) { + if (lookerBuilder_ == null) { + if (referencesCase_ == 3 + && references_ + != com.google.cloud.geminidataanalytics.v1.LookerExploreReferences + .getDefaultInstance()) { + references_ = + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.newBuilder( + (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_) + .mergeFrom(value) + .buildPartial(); + } else { + references_ = value; + } + onChanged(); + } else { + if (referencesCase_ == 3) { + lookerBuilder_.mergeFrom(value); + } else { + lookerBuilder_.setMessage(value); + } + } + referencesCase_ = 3; + return this; + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + public Builder clearLooker() { + if (lookerBuilder_ == null) { + if (referencesCase_ == 3) { + referencesCase_ = 0; + references_ = null; + onChanged(); + } + } else { + if (referencesCase_ == 3) { + referencesCase_ = 0; + references_ = null; + } + lookerBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder + getLookerBuilder() { + return internalGetLookerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder + getLookerOrBuilder() { + if ((referencesCase_ == 3) && (lookerBuilder_ != null)) { + return lookerBuilder_.getMessageOrBuilder(); + } else { + if (referencesCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_; + } + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } + } + + /** + * + * + *
+     * References to Looker Explores.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder> + internalGetLookerFieldBuilder() { + if (lookerBuilder_ == null) { + if (!(referencesCase_ == 3)) { + references_ = + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } + lookerBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) references_, + getParentForChildren(), + isClean()); + references_ = null; + } + referencesCase_ = 3; + onChanged(); + return lookerBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DatasourceReferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DatasourceReferences) + private static final com.google.cloud.geminidataanalytics.v1.DatasourceReferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DatasourceReferences(); + } + + public static com.google.cloud.geminidataanalytics.v1.DatasourceReferences getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatasourceReferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DatasourceReferences getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferencesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferencesOrBuilder.java new file mode 100644 index 000000000000..02c3ca7cc382 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DatasourceReferencesOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DatasourceReferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DatasourceReferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return Whether the bq field is set. + */ + boolean hasBq(); + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + * + * @return The bq. + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferences getBq(); + + /** + * + * + *
+   * References to BigQuery tables.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.BigQueryTableReferences bq = 1; + */ + com.google.cloud.geminidataanalytics.v1.BigQueryTableReferencesOrBuilder getBqOrBuilder(); + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return Whether the studio field is set. + */ + boolean hasStudio(); + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + * + * @return The studio. + */ + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences getStudio(); + + /** + * + * + *
+   * References to Looker Studio datasources.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.StudioDatasourceReferences studio = 2; + */ + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder getStudioOrBuilder(); + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return Whether the looker field is set. + */ + boolean hasLooker(); + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + * + * @return The looker. + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences getLooker(); + + /** + * + * + *
+   * References to Looker Explores.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.LookerExploreReferences looker = 3; + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder getLookerOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.DatasourceReferences.ReferencesCase getReferencesCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequest.java new file mode 100644 index 000000000000..067df311622b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequest.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for deleting a conversation based on parent and conversation id.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DeleteConversationRequest} + */ +@com.google.protobuf.Generated +public final class DeleteConversationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DeleteConversationRequest) + DeleteConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteConversationRequest"); + } + + // Use DeleteConversationRequest.newBuilder() to construct. + private DeleteConversationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteConversationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DeleteConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest other = + (com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest 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.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest 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.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DeleteConversationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for deleting a conversation based on parent and conversation id.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DeleteConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DeleteConversationRequest) + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest build() { + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest result = + new com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DeleteConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DeleteConversationRequest) + private static final com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DeleteConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequestOrBuilder.java new file mode 100644 index 000000000000..b4a2805d1bfc --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteConversationRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DeleteConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DeleteConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequest.java new file mode 100644 index 000000000000..2edfad39bd54 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequest.java @@ -0,0 +1,904 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for deleting a DataAgent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest} + */ +@com.google.protobuf.Generated +public final class DeleteDataAgentRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) + DeleteDataAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteDataAgentRequest"); + } + + // Use DeleteDataAgentRequest.newBuilder() to construct. + private DeleteDataAgentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteDataAgentRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.DeleteDataAgentRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest other = + (com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest 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.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest 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.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.DeleteDataAgentRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a DataAgent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_DeleteDataAgentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest build() { + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest result = + new com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) + private static final com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.DeleteDataAgentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequestOrBuilder.java new file mode 100644 index 000000000000..eb56afc99dc2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/DeleteDataAgentRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface DeleteDataAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessage.java new file mode 100644 index 000000000000..d691ad5397e4 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessage.java @@ -0,0 +1,622 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * An error message from a tool call.
+ * This message is used to represent an error that occurred while an agent was
+ * trying to use a tool. It's important to note that not all errors are
+ * terminal. Many are recoverable, and the agent may use the information from
+ * this error message to self-correct and retry the tool call or try a
+ * different approach.
+ *
+ * For example, if a data query fails, the agent might receive an
+ * `ErrorMessage`, analyze it, and then generate a corrected query.
+ *
+ * Clients should be cautious about interpreting this message as a definitive
+ * failure. It can be part of the agent's normal, iterative process of
+ * completing a task. Surfacing these errors directly to end-users without
+ * context (e.g., as a "hard failure") may be misleading.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ErrorMessage} + */ +@com.google.protobuf.Generated +public final class ErrorMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ErrorMessage) + ErrorMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ErrorMessage"); + } + + // Use ErrorMessage.newBuilder() to construct. + private ErrorMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ErrorMessage() { + text_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ErrorMessage.class, + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+   * Output only. The text of the error.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The text of the error.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ErrorMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ErrorMessage other = + (com.google.cloud.geminidataanalytics.v1.ErrorMessage) obj; + + if (!getText().equals(other.getText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage 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.geminidataanalytics.v1.ErrorMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage 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.geminidataanalytics.v1.ErrorMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ErrorMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An error message from a tool call.
+   * This message is used to represent an error that occurred while an agent was
+   * trying to use a tool. It's important to note that not all errors are
+   * terminal. Many are recoverable, and the agent may use the information from
+   * this error message to self-correct and retry the tool call or try a
+   * different approach.
+   *
+   * For example, if a data query fails, the agent might receive an
+   * `ErrorMessage`, analyze it, and then generate a corrected query.
+   *
+   * Clients should be cautious about interpreting this message as a definitive
+   * failure. It can be part of the agent's normal, iterative process of
+   * completing a task. Surfacing these errors directly to end-users without
+   * context (e.g., as a "hard failure") may be misleading.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ErrorMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ErrorMessage) + com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ErrorMessage.class, + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ErrorMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ErrorMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessage build() { + com.google.cloud.geminidataanalytics.v1.ErrorMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.ErrorMessage result = + new com.google.cloud.geminidataanalytics.v1.ErrorMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ErrorMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ErrorMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ErrorMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ErrorMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + + /** + * + * + *
+     * Output only. The text of the error.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The text of the error.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The text of the error.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The text of the error.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The text of the error.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ErrorMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ErrorMessage) + private static final com.google.cloud.geminidataanalytics.v1.ErrorMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ErrorMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.ErrorMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ErrorMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessageOrBuilder.java new file mode 100644 index 000000000000..cad795540aa7 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ErrorMessageOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ErrorMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ErrorMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The text of the error.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+   * Output only. The text of the error.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueries.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueries.java new file mode 100644 index 000000000000..175772bcdf99 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueries.java @@ -0,0 +1,1054 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message containing derived and authored example queries.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ExampleQueries} + */ +@com.google.protobuf.Generated +public final class ExampleQueries extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ExampleQueries) + ExampleQueriesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExampleQueries"); + } + + // Use ExampleQueries.newBuilder() to construct. + private ExampleQueries(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExampleQueries() { + exampleQueries_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ExampleQueries.class, + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder.class); + } + + public static final int EXAMPLE_QUERIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List exampleQueries_; + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExampleQueriesList() { + return exampleQueries_; + } + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExampleQueriesOrBuilderList() { + return exampleQueries_; + } + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getExampleQueriesCount() { + return exampleQueries_.size(); + } + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index) { + return exampleQueries_.get(index); + } + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index) { + return exampleQueries_.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 < exampleQueries_.size(); i++) { + output.writeMessage(1, exampleQueries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < exampleQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, exampleQueries_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.ExampleQueries)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ExampleQueries other = + (com.google.cloud.geminidataanalytics.v1.ExampleQueries) obj; + + if (!getExampleQueriesList().equals(other.getExampleQueriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExampleQueriesCount() > 0) { + hash = (37 * hash) + EXAMPLE_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getExampleQueriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries 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.geminidataanalytics.v1.ExampleQueries parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries 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.geminidataanalytics.v1.ExampleQueries parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ExampleQueries 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message containing derived and authored example queries.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ExampleQueries} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ExampleQueries) + com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ExampleQueries.class, + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ExampleQueries.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (exampleQueriesBuilder_ == null) { + exampleQueries_ = java.util.Collections.emptyList(); + } else { + exampleQueries_ = null; + exampleQueriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQueries_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueries getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueries build() { + com.google.cloud.geminidataanalytics.v1.ExampleQueries result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueries buildPartial() { + com.google.cloud.geminidataanalytics.v1.ExampleQueries result = + new com.google.cloud.geminidataanalytics.v1.ExampleQueries(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ExampleQueries result) { + if (exampleQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + exampleQueries_ = java.util.Collections.unmodifiableList(exampleQueries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.exampleQueries_ = exampleQueries_; + } else { + result.exampleQueries_ = exampleQueriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ExampleQueries result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ExampleQueries) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ExampleQueries) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ExampleQueries other) { + if (other == com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance()) + return this; + if (exampleQueriesBuilder_ == null) { + if (!other.exampleQueries_.isEmpty()) { + if (exampleQueries_.isEmpty()) { + exampleQueries_ = other.exampleQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExampleQueriesIsMutable(); + exampleQueries_.addAll(other.exampleQueries_); + } + onChanged(); + } + } else { + if (!other.exampleQueries_.isEmpty()) { + if (exampleQueriesBuilder_.isEmpty()) { + exampleQueriesBuilder_.dispose(); + exampleQueriesBuilder_ = null; + exampleQueries_ = other.exampleQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + exampleQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExampleQueriesFieldBuilder() + : null; + } else { + exampleQueriesBuilder_.addAllMessages(other.exampleQueries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.ExampleQuery m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.parser(), + extensionRegistry); + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(m); + } else { + exampleQueriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List exampleQueries_ = + java.util.Collections.emptyList(); + + private void ensureExampleQueriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + exampleQueries_ = + new java.util.ArrayList( + exampleQueries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + exampleQueriesBuilder_; + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesList() { + if (exampleQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(exampleQueries_); + } else { + return exampleQueriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getExampleQueriesCount() { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.size(); + } else { + return exampleQueriesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index) { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.get(index); + } else { + return exampleQueriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.set(index, value); + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.add(value); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExampleQueriesIsMutable(); + exampleQueries_.add(index, value); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExampleQueries( + int index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + exampleQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllExampleQueries( + java.lang.Iterable values) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exampleQueries_); + onChanged(); + } else { + exampleQueriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExampleQueries() { + if (exampleQueriesBuilder_ == null) { + exampleQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + exampleQueriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeExampleQueries(int index) { + if (exampleQueriesBuilder_ == null) { + ensureExampleQueriesIsMutable(); + exampleQueries_.remove(index); + onChanged(); + } else { + exampleQueriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder getExampleQueriesBuilder( + int index) { + return internalGetExampleQueriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index) { + if (exampleQueriesBuilder_ == null) { + return exampleQueries_.get(index); + } else { + return exampleQueriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesOrBuilderList() { + if (exampleQueriesBuilder_ != null) { + return exampleQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exampleQueries_); + } + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder addExampleQueriesBuilder() { + return internalGetExampleQueriesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder addExampleQueriesBuilder( + int index) { + return internalGetExampleQueriesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of derived and authored example queries, providing
+     * examples of relevant and commonly used SQL queries and their corresponding
+     * natural language queries optionally present. Currently only used for
+     * BigQuery data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExampleQueriesBuilderList() { + return internalGetExampleQueriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + internalGetExampleQueriesFieldBuilder() { + if (exampleQueriesBuilder_ == null) { + exampleQueriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder>( + exampleQueries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + exampleQueries_ = null; + } + return exampleQueriesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ExampleQueries) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ExampleQueries) + private static final com.google.cloud.geminidataanalytics.v1.ExampleQueries DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ExampleQueries(); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQueries getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExampleQueries parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ExampleQueries getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueriesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueriesOrBuilder.java new file mode 100644 index 000000000000..012677afb342 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueriesOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ExampleQueriesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ExampleQueries) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getExampleQueriesList(); + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQueries(int index); + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getExampleQueriesCount(); + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getExampleQueriesOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of derived and authored example queries, providing
+   * examples of relevant and commonly used SQL queries and their corresponding
+   * natural language queries optionally present. Currently only used for
+   * BigQuery data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.ExampleQuery example_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueriesOrBuilder( + int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQuery.java new file mode 100644 index 000000000000..9a2f9bd6d916 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQuery.java @@ -0,0 +1,1592 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Example of relevant and commonly used SQL query and its corresponding natural
+ * language queries optionally present. Currently only used for BigQuery data
+ * sources.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ExampleQuery} + */ +@com.google.protobuf.Generated +public final class ExampleQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ExampleQuery) + ExampleQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExampleQuery"); + } + + // Use ExampleQuery.newBuilder() to construct. + private ExampleQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExampleQuery() { + naturalLanguageQuestion_ = ""; + parameters_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.class, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder.class); + } + + private int queryCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object query_; + + public enum QueryCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SQL_QUERY(101), + QUERY_NOT_SET(0); + private final int value; + + private QueryCase(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 QueryCase valueOf(int value) { + return forNumber(value); + } + + public static QueryCase forNumber(int value) { + switch (value) { + case 101: + return SQL_QUERY; + case 0: + return QUERY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public QueryCase getQueryCase() { + return QueryCase.forNumber(queryCase_); + } + + public static final int SQL_QUERY_FIELD_NUMBER = 101; + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sqlQuery field is set. + */ + public boolean hasSqlQuery() { + return queryCase_ == 101; + } + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sqlQuery. + */ + public java.lang.String getSqlQuery() { + java.lang.Object ref = ""; + if (queryCase_ == 101) { + ref = query_; + } + 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 (queryCase_ == 101) { + query_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sqlQuery. + */ + public com.google.protobuf.ByteString getSqlQueryBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 101) { + ref = query_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (queryCase_ == 101) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NATURAL_LANGUAGE_QUESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object naturalLanguageQuestion_ = ""; + + /** + * + * + *
+   * Optional. A natural language question that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The naturalLanguageQuestion. + */ + @java.lang.Override + public java.lang.String getNaturalLanguageQuestion() { + java.lang.Object ref = naturalLanguageQuestion_; + 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(); + naturalLanguageQuestion_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A natural language question that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for naturalLanguageQuestion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNaturalLanguageQuestionBytes() { + java.lang.Object ref = naturalLanguageQuestion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + naturalLanguageQuestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List parameters_; + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersList() { + return parameters_; + } + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameter getParameters(int index) { + return parameters_.get(index); + } + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder getParametersOrBuilder( + int index) { + return parameters_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(naturalLanguageQuestion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, naturalLanguageQuestion_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(3, parameters_.get(i)); + } + if (queryCase_ == 101) { + com.google.protobuf.GeneratedMessage.writeString(output, 101, query_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(naturalLanguageQuestion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, naturalLanguageQuestion_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parameters_.get(i)); + } + if (queryCase_ == 101) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(101, query_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ExampleQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ExampleQuery other = + (com.google.cloud.geminidataanalytics.v1.ExampleQuery) obj; + + if (!getNaturalLanguageQuestion().equals(other.getNaturalLanguageQuestion())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getQueryCase().equals(other.getQueryCase())) return false; + switch (queryCase_) { + case 101: + if (!getSqlQuery().equals(other.getSqlQuery())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NATURAL_LANGUAGE_QUESTION_FIELD_NUMBER; + hash = (53 * hash) + getNaturalLanguageQuestion().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + switch (queryCase_) { + case 101: + hash = (37 * hash) + SQL_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSqlQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery 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.geminidataanalytics.v1.ExampleQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery 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.geminidataanalytics.v1.ExampleQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ExampleQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Example of relevant and commonly used SQL query and its corresponding natural
+   * language queries optionally present. Currently only used for BigQuery data
+   * sources.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ExampleQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ExampleQuery) + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.class, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ExampleQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + naturalLanguageQuestion_ = ""; + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + } else { + parameters_ = null; + parametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + queryCase_ = 0; + query_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_ExampleQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery build() { + com.google.cloud.geminidataanalytics.v1.ExampleQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.ExampleQuery result = + new com.google.cloud.geminidataanalytics.v1.ExampleQuery(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ExampleQuery result) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ExampleQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.naturalLanguageQuestion_ = naturalLanguageQuestion_; + } + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.ExampleQuery result) { + result.queryCase_ = queryCase_; + result.query_ = this.query_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ExampleQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ExampleQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ExampleQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()) + return this; + if (!other.getNaturalLanguageQuestion().isEmpty()) { + naturalLanguageQuestion_ = other.naturalLanguageQuestion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000004); + parametersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + switch (other.getQueryCase()) { + case SQL_QUERY: + { + queryCase_ = 101; + query_ = other.query_; + onChanged(); + break; + } + case QUERY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + naturalLanguageQuestion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 26: + { + com.google.cloud.geminidataanalytics.v1.QueryParameter m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.QueryParameter.parser(), + extensionRegistry); + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(m); + } else { + parametersBuilder_.addMessage(m); + } + break; + } // case 26 + case 810: + { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 101; + query_ = s; + break; + } // case 810 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int queryCase_ = 0; + private java.lang.Object query_; + + public QueryCase getQueryCase() { + return QueryCase.forNumber(queryCase_); + } + + public Builder clearQuery() { + queryCase_ = 0; + query_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sqlQuery field is set. + */ + @java.lang.Override + public boolean hasSqlQuery() { + return queryCase_ == 101; + } + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sqlQuery. + */ + @java.lang.Override + public java.lang.String getSqlQuery() { + java.lang.Object ref = ""; + if (queryCase_ == 101) { + ref = query_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (queryCase_ == 101) { + query_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sqlQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSqlQueryBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 101) { + ref = query_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (queryCase_ == 101) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sqlQuery to set. + * @return This builder for chaining. + */ + public Builder setSqlQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryCase_ = 101; + query_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSqlQuery() { + if (queryCase_ == 101) { + queryCase_ = 0; + query_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The SQL query that should be generated to answer the natural
+     * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+     * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+     * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sqlQuery to set. + * @return This builder for chaining. + */ + public Builder setSqlQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryCase_ = 101; + query_ = value; + onChanged(); + return this; + } + + private java.lang.Object naturalLanguageQuestion_ = ""; + + /** + * + * + *
+     * Optional. A natural language question that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The naturalLanguageQuestion. + */ + public java.lang.String getNaturalLanguageQuestion() { + java.lang.Object ref = naturalLanguageQuestion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + naturalLanguageQuestion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A natural language question that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for naturalLanguageQuestion. + */ + public com.google.protobuf.ByteString getNaturalLanguageQuestionBytes() { + java.lang.Object ref = naturalLanguageQuestion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + naturalLanguageQuestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A natural language question that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The naturalLanguageQuestion to set. + * @return This builder for chaining. + */ + public Builder setNaturalLanguageQuestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + naturalLanguageQuestion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A natural language question that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNaturalLanguageQuestion() { + naturalLanguageQuestion_ = getDefaultInstance().getNaturalLanguageQuestion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A natural language question that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for naturalLanguageQuestion to set. + * @return This builder for chaining. + */ + public Builder setNaturalLanguageQuestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + naturalLanguageQuestion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + parameters_ = + new java.util.ArrayList( + parameters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameter, + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(com.google.cloud.geminidataanalytics.v1.QueryParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllParameters( + java.lang.Iterable + values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder getParametersBuilder( + int index) { + return internalGetParametersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder addParametersBuilder() { + return internalGetParametersFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.QueryParameter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder addParametersBuilder( + int index) { + return internalGetParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.QueryParameter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of query parameters.
+     * Example: The parameterized SQL query
+     * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+     * id.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersBuilderList() { + return internalGetParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameter, + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder> + internalGetParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameter, + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ExampleQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ExampleQuery) + private static final com.google.cloud.geminidataanalytics.v1.ExampleQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ExampleQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.ExampleQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExampleQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ExampleQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueryOrBuilder.java new file mode 100644 index 000000000000..3dbe7ddf609d --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ExampleQueryOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ExampleQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ExampleQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sqlQuery field is set. + */ + boolean hasSqlQuery(); + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sqlQuery. + */ + java.lang.String getSqlQuery(); + + /** + * + * + *
+   * Optional. The SQL query that should be generated to answer the natural
+   * language question. For example: "SELECT COUNT(*) FROM orders WHERE
+   * order_date BETWEEN '2024-01-01' AND '2024-01-31'"
+   * 
+ * + * string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sqlQuery. + */ + com.google.protobuf.ByteString getSqlQueryBytes(); + + /** + * + * + *
+   * Optional. A natural language question that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The naturalLanguageQuestion. + */ + java.lang.String getNaturalLanguageQuestion(); + + /** + * + * + *
+   * Optional. A natural language question that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for naturalLanguageQuestion. + */ + com.google.protobuf.ByteString getNaturalLanguageQuestionBytes(); + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getParametersList(); + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.QueryParameter getParameters(int index); + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getParametersCount(); + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getParametersOrBuilderList(); + + /** + * + * + *
+   * Optional. The list of query parameters.
+   * Example: The parameterized SQL query
+   * "SELECT * FROM my_table WHERE id = @id" can be matched with any value of
+   * id.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder getParametersOrBuilder(int index); + + com.google.cloud.geminidataanalytics.v1.ExampleQuery.QueryCase getQueryCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Field.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Field.java new file mode 100644 index 000000000000..d7f46753de72 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Field.java @@ -0,0 +1,2937 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A field in a schema.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Field} + */ +@com.google.protobuf.Generated +public final class Field extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Field"); + } + + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Field() { + name_ = ""; + type_ = ""; + description_ = ""; + mode_ = ""; + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + subfields_ = java.util.Collections.emptyList(); + category_ = ""; + valueFormat_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Field.class, + com.google.cloud.geminidataanalytics.v1.Field.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. The name of the field.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The name of the field.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * Optional. The type of the field.
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The type of the field.
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A brief description of the field.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A brief description of the field.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object mode_ = ""; + + /** + * + * + *
+   * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+   * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + 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(); + mode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+   * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYNONYMS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + return synonyms_; + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + public int getSynonymsCount() { + return synonyms_.size(); + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); + } + + public static final int TAGS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. Field display_name (same as label in
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Field display_name (same as label in
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 SUBFIELDS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List subfields_; + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getSubfieldsList() { + return subfields_; + } + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSubfieldsOrBuilderList() { + return subfields_; + } + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSubfieldsCount() { + return subfields_.size(); + } + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Field getSubfields(int index) { + return subfields_.get(index); + } + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getSubfieldsOrBuilder(int index) { + return subfields_.get(index); + } + + public static final int CATEGORY_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object category_ = ""; + + /** + * + * + *
+   * Optional. Field category, not required, currently only useful for Looker.
+   * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The category. + */ + @java.lang.Override + public java.lang.String getCategory() { + java.lang.Object ref = category_; + 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(); + category_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Field category, not required, currently only useful for Looker.
+   * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for category. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FORMAT_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object valueFormat_ = ""; + + /** + * + * + *
+   * Optional. Looker only. Value format of the field.
+   * Ref:
+   * https://cloud.google.com/looker/docs/reference/param-field-value-format
+   * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The valueFormat. + */ + @java.lang.Override + public java.lang.String getValueFormat() { + java.lang.Object ref = valueFormat_; + 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(); + valueFormat_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Looker only. Value format of the field.
+   * Ref:
+   * https://cloud.google.com/looker/docs/reference/param-field-value-format
+   * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for valueFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueFormatBytes() { + java.lang.Object ref = valueFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueFormat_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, mode_); + } + for (int i = 0; i < synonyms_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, synonyms_.getRaw(i)); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, tags_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, displayName_); + } + for (int i = 0; i < subfields_.size(); i++) { + output.writeMessage(9, subfields_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(category_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, category_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valueFormat_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, valueFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, mode_); + } + { + int dataSize = 0; + for (int i = 0; i < synonyms_.size(); i++) { + dataSize += computeStringSizeNoTag(synonyms_.getRaw(i)); + } + size += dataSize; + size += 1 * getSynonymsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, displayName_); + } + for (int i = 0; i < subfields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, subfields_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(category_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, category_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valueFormat_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, valueFormat_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Field)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Field other = + (com.google.cloud.geminidataanalytics.v1.Field) obj; + + if (!getName().equals(other.getName())) return false; + if (!getType().equals(other.getType())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSynonymsList().equals(other.getSynonymsList())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getSubfieldsList().equals(other.getSubfieldsList())) return false; + if (!getCategory().equals(other.getCategory())) return false; + if (!getValueFormat().equals(other.getValueFormat())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + if (getSynonymsCount() > 0) { + hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; + hash = (53 * hash) + getSynonymsList().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(); + if (getSubfieldsCount() > 0) { + hash = (37 * hash) + SUBFIELDS_FIELD_NUMBER; + hash = (53 * hash) + getSubfieldsList().hashCode(); + } + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + hash = (37 * hash) + VALUE_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getValueFormat().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Field 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.geminidataanalytics.v1.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Field 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.geminidataanalytics.v1.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Field 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A field in a schema.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Field} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Field) + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Field.class, + com.google.cloud.geminidataanalytics.v1.Field.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Field.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = ""; + description_ = ""; + mode_ = ""; + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + if (subfieldsBuilder_ == null) { + subfields_ = java.util.Collections.emptyList(); + } else { + subfields_ = null; + subfieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + category_ = ""; + valueFormat_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Field_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Field getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Field build() { + com.google.cloud.geminidataanalytics.v1.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Field buildPartial() { + com.google.cloud.geminidataanalytics.v1.Field result = + new com.google.cloud.geminidataanalytics.v1.Field(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.geminidataanalytics.v1.Field result) { + if (subfieldsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + subfields_ = java.util.Collections.unmodifiableList(subfields_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.subfields_ = subfields_; + } else { + result.subfields_ = subfieldsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Field result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + synonyms_.makeImmutable(); + result.synonyms_ = synonyms_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.valueFormat_ = valueFormat_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Field) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Field) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Field other) { + if (other == com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.synonyms_.isEmpty()) { + if (synonyms_.isEmpty()) { + synonyms_ = other.synonyms_; + bitField0_ |= 0x00000010; + } else { + ensureSynonymsIsMutable(); + synonyms_.addAll(other.synonyms_); + } + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000020; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (subfieldsBuilder_ == null) { + if (!other.subfields_.isEmpty()) { + if (subfields_.isEmpty()) { + subfields_ = other.subfields_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureSubfieldsIsMutable(); + subfields_.addAll(other.subfields_); + } + onChanged(); + } + } else { + if (!other.subfields_.isEmpty()) { + if (subfieldsBuilder_.isEmpty()) { + subfieldsBuilder_.dispose(); + subfieldsBuilder_ = null; + subfields_ = other.subfields_; + bitField0_ = (bitField0_ & ~0x00000080); + subfieldsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSubfieldsFieldBuilder() + : null; + } else { + subfieldsBuilder_.addAllMessages(other.subfields_); + } + } + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getValueFormat().isEmpty()) { + valueFormat_ = other.valueFormat_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 58 + case 66: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + com.google.cloud.geminidataanalytics.v1.Field m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Field.parser(), extensionRegistry); + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + subfields_.add(m); + } else { + subfieldsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + category_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + valueFormat_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. The name of the field.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The name of the field.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The name of the field.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the field.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the field.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * Optional. The type of the field.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The type of the field.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The type of the field.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the field.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the field.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A brief description of the field.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A brief description of the field.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A brief description of the field.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A brief description of the field.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A brief description of the field.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + + /** + * + * + *
+     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+     * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+     * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+     * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+     * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + mode_ = getDefaultInstance().getMode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+     * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSynonymsIsMutable() { + if (!synonyms_.isModifiable()) { + synonyms_ = new com.google.protobuf.LazyStringArrayList(synonyms_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + synonyms_.makeImmutable(); + return synonyms_; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + public int getSynonymsCount() { + return synonyms_.size(); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The synonyms to set. + * @return This builder for chaining. + */ + public Builder setSynonyms(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSynonymsIsMutable(); + synonyms_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The synonyms to add. + * @return This builder for chaining. + */ + public Builder addSynonyms(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSynonymsIsMutable(); + synonyms_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The synonyms to add. + * @return This builder for chaining. + */ + public Builder addAllSynonyms(java.lang.Iterable values) { + ensureSynonymsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, synonyms_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSynonyms() { + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the synonyms to add. + * @return This builder for chaining. + */ + public Builder addSynonymsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSynonymsIsMutable(); + synonyms_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the field, used for
+     * categorization. For example: ["identifier", "customer", "pii"]. Currently
+     * only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. Field display_name (same as label in
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field display_name (same as label in
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field display_name (same as label in
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field display_name (same as label in
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field display_name (same as label in
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List subfields_ = + java.util.Collections.emptyList(); + + private void ensureSubfieldsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + subfields_ = + new java.util.ArrayList(subfields_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder> + subfieldsBuilder_; + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getSubfieldsList() { + if (subfieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subfields_); + } else { + return subfieldsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSubfieldsCount() { + if (subfieldsBuilder_ == null) { + return subfields_.size(); + } else { + return subfieldsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field getSubfields(int index) { + if (subfieldsBuilder_ == null) { + return subfields_.get(index); + } else { + return subfieldsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubfields(int index, com.google.cloud.geminidataanalytics.v1.Field value) { + if (subfieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubfieldsIsMutable(); + subfields_.set(index, value); + onChanged(); + } else { + subfieldsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubfields( + int index, com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + subfields_.set(index, builderForValue.build()); + onChanged(); + } else { + subfieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubfields(com.google.cloud.geminidataanalytics.v1.Field value) { + if (subfieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubfieldsIsMutable(); + subfields_.add(value); + onChanged(); + } else { + subfieldsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubfields(int index, com.google.cloud.geminidataanalytics.v1.Field value) { + if (subfieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubfieldsIsMutable(); + subfields_.add(index, value); + onChanged(); + } else { + subfieldsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubfields( + com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + subfields_.add(builderForValue.build()); + onChanged(); + } else { + subfieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubfields( + int index, com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + subfields_.add(index, builderForValue.build()); + onChanged(); + } else { + subfieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSubfields( + java.lang.Iterable values) { + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subfields_); + onChanged(); + } else { + subfieldsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSubfields() { + if (subfieldsBuilder_ == null) { + subfields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + subfieldsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSubfields(int index) { + if (subfieldsBuilder_ == null) { + ensureSubfieldsIsMutable(); + subfields_.remove(index); + onChanged(); + } else { + subfieldsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder getSubfieldsBuilder(int index) { + return internalGetSubfieldsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getSubfieldsOrBuilder(int index) { + if (subfieldsBuilder_ == null) { + return subfields_.get(index); + } else { + return subfieldsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSubfieldsOrBuilderList() { + if (subfieldsBuilder_ != null) { + return subfieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subfields_); + } + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder addSubfieldsBuilder() { + return internalGetSubfieldsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder addSubfieldsBuilder(int index) { + return internalGetSubfieldsFieldBuilder() + .addBuilder(index, com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Recursive property for nested schema structures.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSubfieldsBuilderList() { + return internalGetSubfieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder> + internalGetSubfieldsFieldBuilder() { + if (subfieldsBuilder_ == null) { + subfieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder>( + subfields_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + subfields_ = null; + } + return subfieldsBuilder_; + } + + private java.lang.Object category_ = ""; + + /** + * + * + *
+     * Optional. Field category, not required, currently only useful for Looker.
+     * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Field category, not required, currently only useful for Looker.
+     * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for category. + */ + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Field category, not required, currently only useful for Looker.
+     * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + category_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field category, not required, currently only useful for Looker.
+     * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + category_ = getDefaultInstance().getCategory(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field category, not required, currently only useful for Looker.
+     * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + category_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object valueFormat_ = ""; + + /** + * + * + *
+     * Optional. Looker only. Value format of the field.
+     * Ref:
+     * https://cloud.google.com/looker/docs/reference/param-field-value-format
+     * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The valueFormat. + */ + public java.lang.String getValueFormat() { + java.lang.Object ref = valueFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Looker only. Value format of the field.
+     * Ref:
+     * https://cloud.google.com/looker/docs/reference/param-field-value-format
+     * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for valueFormat. + */ + public com.google.protobuf.ByteString getValueFormatBytes() { + java.lang.Object ref = valueFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Looker only. Value format of the field.
+     * Ref:
+     * https://cloud.google.com/looker/docs/reference/param-field-value-format
+     * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The valueFormat to set. + * @return This builder for chaining. + */ + public Builder setValueFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueFormat_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Looker only. Value format of the field.
+     * Ref:
+     * https://cloud.google.com/looker/docs/reference/param-field-value-format
+     * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValueFormat() { + valueFormat_ = getDefaultInstance().getValueFormat(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Looker only. Value format of the field.
+     * Ref:
+     * https://cloud.google.com/looker/docs/reference/param-field-value-format
+     * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for valueFormat to set. + * @return This builder for chaining. + */ + public Builder setValueFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueFormat_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Field) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Field) + private static final com.google.cloud.geminidataanalytics.v1.Field DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Field(); + } + + public static com.google.cloud.geminidataanalytics.v1.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/FieldOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/FieldOrBuilder.java new file mode 100644 index 000000000000..18747747830c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/FieldOrBuilder.java @@ -0,0 +1,404 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface FieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The name of the field.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. The name of the field.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The type of the field.
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * Optional. The type of the field.
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Optional. A brief description of the field.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A brief description of the field.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+   * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + java.lang.String getMode(); + + /** + * + * + *
+   * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
+   * 
+ * + * string mode = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + java.util.List getSynonymsList(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + int getSynonymsCount(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + java.lang.String getSynonyms(int index); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + com.google.protobuf.ByteString getSynonymsBytes(int index); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the field, used for
+   * categorization. For example: ["identifier", "customer", "pii"]. Currently
+   * only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + + /** + * + * + *
+   * Optional. Field display_name (same as label in
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. Field display_name (same as label in
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSubfieldsList(); + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Field getSubfields(int index); + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSubfieldsCount(); + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSubfieldsOrBuilderList(); + + /** + * + * + *
+   * Optional. Recursive property for nested schema structures.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getSubfieldsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Field category, not required, currently only useful for Looker.
+   * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The category. + */ + java.lang.String getCategory(); + + /** + * + * + *
+   * Optional. Field category, not required, currently only useful for Looker.
+   * 
+ * + * string category = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for category. + */ + com.google.protobuf.ByteString getCategoryBytes(); + + /** + * + * + *
+   * Optional. Looker only. Value format of the field.
+   * Ref:
+   * https://cloud.google.com/looker/docs/reference/param-field-value-format
+   * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The valueFormat. + */ + java.lang.String getValueFormat(); + + /** + * + * + *
+   * Optional. Looker only. Value format of the field.
+   * Ref:
+   * https://cloud.google.com/looker/docs/reference/param-field-value-format
+   * 
+ * + * string value_format = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for valueFormat. + */ + com.google.protobuf.ByteString getValueFormatBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequest.java new file mode 100644 index 000000000000..2a74574c00ca --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequest.java @@ -0,0 +1,631 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for getting a conversation based on parent and conversation id.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GetConversationRequest} + */ +@com.google.protobuf.Generated +public final class GetConversationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.GetConversationRequest) + GetConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetConversationRequest"); + } + + // Use GetConversationRequest.newBuilder() to construct. + private GetConversationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetConversationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.GetConversationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().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.geminidataanalytics.v1.GetConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.GetConversationRequest other = + (com.google.cloud.geminidataanalytics.v1.GetConversationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest 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.geminidataanalytics.v1.GetConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest 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.geminidataanalytics.v1.GetConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.GetConversationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a conversation based on parent and conversation id.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GetConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.GetConversationRequest) + com.google.cloud.geminidataanalytics.v1.GetConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest.class, + com.google.cloud.geminidataanalytics.v1.GetConversationRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.GetConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_GetConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.GetConversationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetConversationRequest build() { + com.google.cloud.geminidataanalytics.v1.GetConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetConversationRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.GetConversationRequest result = + new com.google.cloud.geminidataanalytics.v1.GetConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.GetConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.GetConversationRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.GetConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.GetConversationRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.GetConversationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.GetConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.GetConversationRequest) + private static final com.google.cloud.geminidataanalytics.v1.GetConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.GetConversationRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.GetConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.GetConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequestOrBuilder.java new file mode 100644 index 000000000000..a54c72ba22b8 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetConversationRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface GetConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.GetConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation}`
+   * 
+ * + * + * 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/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequest.java new file mode 100644 index 000000000000..f06c718edb1d --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequest.java @@ -0,0 +1,611 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for getting a DataAgent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GetDataAgentRequest} + */ +@com.google.protobuf.Generated +public final class GetDataAgentRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.GetDataAgentRequest) + GetDataAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDataAgentRequest"); + } + + // Use GetDataAgentRequest.newBuilder() to construct. + private GetDataAgentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDataAgentRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().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.geminidataanalytics.v1.GetDataAgentRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest other = + (com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest 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.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest 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.geminidataanalytics.v1.GetDataAgentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.GetDataAgentRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a DataAgent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GetDataAgentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.GetDataAgentRequest) + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_GetDataAgentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest build() { + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest result = + new com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest other) { + if (other == com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.GetDataAgentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.GetDataAgentRequest) + private static final com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.GetDataAgentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequestOrBuilder.java new file mode 100644 index 000000000000..8932f15b132f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GetDataAgentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface GetDataAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.GetDataAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTerm.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTerm.java new file mode 100644 index 000000000000..f63ad88c230b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTerm.java @@ -0,0 +1,1109 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Definition of a term within a specific domain.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GlossaryTerm} + */ +@com.google.protobuf.Generated +public final class GlossaryTerm extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.GlossaryTerm) + GlossaryTermOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GlossaryTerm"); + } + + // Use GlossaryTerm.newBuilder() to construct. + private GlossaryTerm(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GlossaryTerm() { + displayName_ = ""; + description_ = ""; + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.class, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. User friendly display name of the glossary term being defined.
+   * For example: "CTR", "conversion rate", "pending"
+   * 
+ * + * string display_name = 1 [(.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. User friendly display name of the glossary term being defined.
+   * For example: "CTR", "conversion rate", "pending"
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Required. The description or meaning of the term.
+   * For example: "Click-through rate", "The percentage of users who complete a
+   * desired action", "An order that is waiting to be processed."
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+   * Required. The description or meaning of the term.
+   * For example: "Click-through rate", "The percentage of users who complete a
+   * desired action", "An order that is waiting to be processed."
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + return labels_; + } + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + for (int i = 0; i < labels_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, labels_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + { + int dataSize = 0; + for (int i = 0; i < labels_.size(); i++) { + dataSize += computeStringSizeNoTag(labels_.getRaw(i)); + } + size += dataSize; + size += 1 * getLabelsList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.GlossaryTerm)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.GlossaryTerm other = + (com.google.cloud.geminidataanalytics.v1.GlossaryTerm) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm 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.geminidataanalytics.v1.GlossaryTerm parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm 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.geminidataanalytics.v1.GlossaryTerm parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.GlossaryTerm 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Definition of a term within a specific domain.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.GlossaryTerm} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.GlossaryTerm) + com.google.cloud.geminidataanalytics.v1.GlossaryTermOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.class, + com.google.cloud.geminidataanalytics.v1.GlossaryTerm.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.GlossaryTerm.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + description_ = ""; + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_GlossaryTerm_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm build() { + com.google.cloud.geminidataanalytics.v1.GlossaryTerm result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.GlossaryTerm buildPartial() { + com.google.cloud.geminidataanalytics.v1.GlossaryTerm result = + new com.google.cloud.geminidataanalytics.v1.GlossaryTerm(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.GlossaryTerm result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + labels_.makeImmutable(); + result.labels_ = labels_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.GlossaryTerm) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.GlossaryTerm) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.GlossaryTerm other) { + if (other == com.google.cloud.geminidataanalytics.v1.GlossaryTerm.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ |= 0x00000004; + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLabelsIsMutable(); + labels_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. User friendly display name of the glossary term being defined.
+     * For example: "CTR", "conversion rate", "pending"
+     * 
+ * + * string display_name = 1 [(.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. User friendly display name of the glossary term being defined.
+     * For example: "CTR", "conversion rate", "pending"
+     * 
+ * + * string display_name = 1 [(.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. User friendly display name of the glossary term being defined.
+     * For example: "CTR", "conversion rate", "pending"
+     * 
+ * + * string display_name = 1 [(.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User friendly display name of the glossary term being defined.
+     * For example: "CTR", "conversion rate", "pending"
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User friendly display name of the glossary term being defined.
+     * For example: "CTR", "conversion rate", "pending"
+     * 
+ * + * string display_name = 1 [(.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Required. The description or meaning of the term.
+     * For example: "Click-through rate", "The percentage of users who complete a
+     * desired action", "An order that is waiting to be processed."
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+     * Required. The description or meaning of the term.
+     * For example: "Click-through rate", "The percentage of users who complete a
+     * desired action", "An order that is waiting to be processed."
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+     * Required. The description or meaning of the term.
+     * For example: "Click-through rate", "The percentage of users who complete a
+     * desired action", "An order that is waiting to be processed."
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The description or meaning of the term.
+     * For example: "Click-through rate", "The percentage of users who complete a
+     * desired action", "An order that is waiting to be processed."
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The description or meaning of the term.
+     * For example: "Click-through rate", "The percentage of users who complete a
+     * desired action", "An order that is waiting to be processed."
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLabelsIsMutable() { + if (!labels_.isModifiable()) { + labels_ = new com.google.protobuf.LazyStringArrayList(labels_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + labels_.makeImmutable(); + return labels_; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The labels to set. + * @return This builder for chaining. + */ + public Builder setLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The labels to add. + * @return This builder for chaining. + */ + public Builder addLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The labels to add. + * @return This builder for chaining. + */ + public Builder addAllLabels(java.lang.Iterable values) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLabels() { + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of general purpose labels associated to this term.
+     * For example: ["click rate", "clickthrough", "waiting"]
+     * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the labels to add. + * @return This builder for chaining. + */ + public Builder addLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.GlossaryTerm) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.GlossaryTerm) + private static final com.google.cloud.geminidataanalytics.v1.GlossaryTerm DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.GlossaryTerm(); + } + + public static com.google.cloud.geminidataanalytics.v1.GlossaryTerm getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GlossaryTerm parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.GlossaryTerm getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTermOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTermOrBuilder.java new file mode 100644 index 000000000000..73f818e33b10 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/GlossaryTermOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface GlossaryTermOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.GlossaryTerm) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. User friendly display name of the glossary term being defined.
+   * For example: "CTR", "conversion rate", "pending"
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. User friendly display name of the glossary term being defined.
+   * For example: "CTR", "conversion rate", "pending"
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The description or meaning of the term.
+   * For example: "Click-through rate", "The percentage of users who complete a
+   * desired action", "An order that is waiting to be processed."
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Required. The description or meaning of the term.
+   * For example: "Click-through rate", "The percentage of users who complete a
+   * desired action", "An order that is waiting to be processed."
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + java.util.List getLabelsList(); + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + java.lang.String getLabels(int index); + + /** + * + * + *
+   * Optional. A list of general purpose labels associated to this term.
+   * For example: ["click rate", "clickthrough", "waiting"]
+   * 
+ * + * repeated string labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + com.google.protobuf.ByteString getLabelsBytes(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequest.java new file mode 100644 index 000000000000..09b0a8f8f0b1 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequest.java @@ -0,0 +1,1819 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for requesting list of accessible DataAgents.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest} + */ +@com.google.protobuf.Generated +public final class ListAccessibleDataAgentsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) + ListAccessibleDataAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAccessibleDataAgentsRequest"); + } + + // Use ListAccessibleDataAgentsRequest.newBuilder() to construct. + private ListAccessibleDataAgentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAccessibleDataAgentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + creatorFilter_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.Builder.class); + } + + /** + * + * + *
+   * Filter for the creator of the agent.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter} + */ + public enum CreatorFilter implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * CREATOR_FILTER_UNSPECIFIED = 0; + */ + CREATOR_FILTER_UNSPECIFIED(0), + /** + * + * + *
+     * No creator-specific filter will be applied. All agents will be returned.
+     * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+     * Only agents created by the user calling the API will be returned.
+     * 
+ * + * CREATOR_ONLY = 2; + */ + CREATOR_ONLY(2), + /** + * + * + *
+     * Only agents not created by the user calling the API will be returned.
+     * 
+ * + * NOT_CREATOR_ONLY = 3; + */ + NOT_CREATOR_ONLY(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatorFilter"); + } + + /** + * + * + *
+     * Default value.
+     * 
+ * + * CREATOR_FILTER_UNSPECIFIED = 0; + */ + public static final int CREATOR_FILTER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * No creator-specific filter will be applied. All agents will be returned.
+     * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + + /** + * + * + *
+     * Only agents created by the user calling the API will be returned.
+     * 
+ * + * CREATOR_ONLY = 2; + */ + public static final int CREATOR_ONLY_VALUE = 2; + + /** + * + * + *
+     * Only agents not created by the user calling the API will be returned.
+     * 
+ * + * NOT_CREATOR_ONLY = 3; + */ + public static final int NOT_CREATOR_ONLY_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 CreatorFilter 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 CreatorFilter forNumber(int value) { + switch (value) { + case 0: + return CREATOR_FILTER_UNSPECIFIED; + case 1: + return NONE; + case 2: + return CREATOR_ONLY; + case 3: + return NOT_CREATOR_ONLY; + 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 CreatorFilter findValueByNumber(int number) { + return CreatorFilter.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CreatorFilter[] VALUES = values(); + + public static CreatorFilter 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 CreatorFilter(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter) + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListAccessibleDataAgentsRequest.
+   * 
+ * + * + * 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. Parent value for ListAccessibleDataAgentsRequest.
+   * 
+ * + * + * 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_ = 0; + + /** + * + * + *
+   * Optional. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAccessibleDataAgents` must match the call that provided the page
+   * token. The service may return fewer than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAccessibleDataAgents` must match the call that provided the page
+   * token. The service may return fewer than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 6; + private boolean showDeleted_ = false; + + /** + * + * + *
+   * Optional. If true, the list results will include soft-deleted DataAgents.
+   * Defaults to false.
+   * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + public static final int CREATOR_FILTER_FIELD_NUMBER = 7; + private int creatorFilter_ = 0; + + /** + * + * + *
+   * Optional. Filter for the creator of the agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for creatorFilter. + */ + @java.lang.Override + public int getCreatorFilterValue() { + return creatorFilter_; + } + + /** + * + * + *
+   * Optional. Filter for the creator of the agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The creatorFilter. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + getCreatorFilter() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter result = + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .forNumber(creatorFilter_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (showDeleted_ != false) { + output.writeBool(6, showDeleted_); + } + if (creatorFilter_ + != com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .CREATOR_FILTER_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, creatorFilter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, showDeleted_); + } + if (creatorFilter_ + != com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .CREATOR_FILTER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, creatorFilter_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListAccessibleDataAgentsRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest other = + (com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) 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 (!getOrderBy().equals(other.getOrderBy())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (creatorFilter_ != other.creatorFilter_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (37 * hash) + CREATOR_FILTER_FIELD_NUMBER; + hash = (53 * hash) + creatorFilter_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest 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.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest 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.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListAccessibleDataAgentsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of accessible DataAgents.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + showDeleted_ = false; + creatorFilter_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest build() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest result = + new com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.showDeleted_ = showDeleted_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.creatorFilter_ = creatorFilter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + if (other.creatorFilter_ != 0) { + setCreatorFilterValue(other.getCreatorFilterValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + showDeleted_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + creatorFilter_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListAccessibleDataAgentsRequest.
+     * 
+ * + * + * 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. Parent value for ListAccessibleDataAgentsRequest.
+     * 
+ * + * + * 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. Parent value for ListAccessibleDataAgentsRequest.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListAccessibleDataAgentsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListAccessibleDataAgentsRequest.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAccessibleDataAgents` must match the call that provided the page
+     * token. The service may return fewer than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAccessibleDataAgents` must match the call that provided the page
+     * token. The service may return fewer than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAccessibleDataAgents` must match the call that provided the page
+     * token. The service may return fewer than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAccessibleDataAgents` must match the call that provided the page
+     * token. The service may return fewer than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAccessibleDataAgents` must match the call that provided the page
+     * token. The service may return fewer than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean showDeleted_; + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000020); + showDeleted_ = false; + onChanged(); + return this; + } + + private int creatorFilter_ = 0; + + /** + * + * + *
+     * Optional. Filter for the creator of the agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for creatorFilter. + */ + @java.lang.Override + public int getCreatorFilterValue() { + return creatorFilter_; + } + + /** + * + * + *
+     * Optional. Filter for the creator of the agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for creatorFilter to set. + * @return This builder for chaining. + */ + public Builder setCreatorFilterValue(int value) { + creatorFilter_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter for the creator of the agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The creatorFilter. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + getCreatorFilter() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter result = + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .forNumber(creatorFilter_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Filter for the creator of the agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The creatorFilter to set. + * @return This builder for chaining. + */ + public Builder setCreatorFilter( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + creatorFilter_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter for the creator of the agent.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCreatorFilter() { + bitField0_ = (bitField0_ & ~0x00000040); + creatorFilter_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) + private static final com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccessibleDataAgentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListAccessibleDataAgentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequestOrBuilder.java new file mode 100644 index 000000000000..e92cb4568d95 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListAccessibleDataAgentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListAccessibleDataAgentsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListAccessibleDataAgentsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAccessibleDataAgents` must match the call that provided the page
+   * token. The service may return fewer than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAccessibleDataAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAccessibleDataAgents` must match the call that provided the page
+   * token. The service may return fewer than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. If true, the list results will include soft-deleted DataAgents.
+   * Defaults to false.
+   * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); + + /** + * + * + *
+   * Optional. Filter for the creator of the agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for creatorFilter. + */ + int getCreatorFilterValue(); + + /** + * + * + *
+   * Optional. Filter for the creator of the agent.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter creator_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The creatorFilter. + */ + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest.CreatorFilter + getCreatorFilter(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponse.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponse.java new file mode 100644 index 000000000000..bfd33ce798c9 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponse.java @@ -0,0 +1,1429 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for response to listing accessible DataAgents.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse} + */ +@com.google.protobuf.Generated +public final class ListAccessibleDataAgentsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) + ListAccessibleDataAgentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAccessibleDataAgentsResponse"); + } + + // Use ListAccessibleDataAgentsResponse.newBuilder() to construct. + private ListAccessibleDataAgentsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAccessibleDataAgentsResponse() { + dataAgents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.Builder.class); + } + + public static final int DATA_AGENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataAgents_; + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public java.util.List getDataAgentsList() { + return dataAgents_; + } + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public java.util.List + getDataAgentsOrBuilderList() { + return dataAgents_; + } + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public int getDataAgentsCount() { + return dataAgents_.size(); + } + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index) { + return dataAgents_.get(index); + } + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder( + int index) { + return dataAgents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < dataAgents_.size(); i++) { + output.writeMessage(1, dataAgents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataAgents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataAgents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListAccessibleDataAgentsResponse)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse other = + (com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) obj; + + if (!getDataAgentsList().equals(other.getDataAgentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataAgentsCount() > 0) { + hash = (37 * hash) + DATA_AGENTS_FIELD_NUMBER; + hash = (53 * hash) + getDataAgentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse 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.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse 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.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListAccessibleDataAgentsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing accessible DataAgents.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataAgentsBuilder_ == null) { + dataAgents_ = java.util.Collections.emptyList(); + } else { + dataAgents_ = null; + dataAgentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListAccessibleDataAgentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse build() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse result = + new com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse result) { + if (dataAgentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataAgents_ = java.util.Collections.unmodifiableList(dataAgents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataAgents_ = dataAgents_; + } else { + result.dataAgents_ = dataAgentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + .getDefaultInstance()) return this; + if (dataAgentsBuilder_ == null) { + if (!other.dataAgents_.isEmpty()) { + if (dataAgents_.isEmpty()) { + dataAgents_ = other.dataAgents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataAgentsIsMutable(); + dataAgents_.addAll(other.dataAgents_); + } + onChanged(); + } + } else { + if (!other.dataAgents_.isEmpty()) { + if (dataAgentsBuilder_.isEmpty()) { + dataAgentsBuilder_.dispose(); + dataAgentsBuilder_ = null; + dataAgents_ = other.dataAgents_; + bitField0_ = (bitField0_ & ~0x00000001); + dataAgentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataAgentsFieldBuilder() + : null; + } else { + dataAgentsBuilder_.addAllMessages(other.dataAgents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.DataAgent m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.DataAgent.parser(), + extensionRegistry); + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(m); + } else { + dataAgentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataAgents_ = + java.util.Collections.emptyList(); + + private void ensureDataAgentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataAgents_ = + new java.util.ArrayList(dataAgents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + dataAgentsBuilder_; + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List getDataAgentsList() { + if (dataAgentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataAgents_); + } else { + return dataAgentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public int getDataAgentsCount() { + if (dataAgentsBuilder_ == null) { + return dataAgents_.size(); + } else { + return dataAgentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index) { + if (dataAgentsBuilder_ == null) { + return dataAgents_.get(index); + } else { + return dataAgentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder setDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.set(index, value); + onChanged(); + } else { + dataAgentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder setDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.set(index, builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.add(value); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.add(index, value); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(index, builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addAllDataAgents( + java.lang.Iterable values) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataAgents_); + onChanged(); + } else { + dataAgentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder clearDataAgents() { + if (dataAgentsBuilder_ == null) { + dataAgents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataAgentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder removeDataAgents(int index) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.remove(index); + onChanged(); + } else { + dataAgentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder getDataAgentsBuilder( + int index) { + return internalGetDataAgentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder( + int index) { + if (dataAgentsBuilder_ == null) { + return dataAgents_.get(index); + } else { + return dataAgentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List + getDataAgentsOrBuilderList() { + if (dataAgentsBuilder_ != null) { + return dataAgentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataAgents_); + } + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder addDataAgentsBuilder() { + return internalGetDataAgentsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder addDataAgentsBuilder( + int index) { + return internalGetDataAgentsFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of accessible DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List + getDataAgentsBuilderList() { + return internalGetDataAgentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + internalGetDataAgentsFieldBuilder() { + if (dataAgentsBuilder_ == null) { + dataAgentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder>( + dataAgents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataAgents_ = null; + } + return dataAgentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) + private static final com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccessibleDataAgentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListAccessibleDataAgentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponseOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponseOrBuilder.java new file mode 100644 index 000000000000..d6a007b43f8c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListAccessibleDataAgentsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListAccessibleDataAgentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + java.util.List getDataAgentsList(); + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index); + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + int getDataAgentsCount(); + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + java.util.List + getDataAgentsOrBuilderList(); + + /** + * + * + *
+   * The list of accessible DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder(int index); + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequest.java new file mode 100644 index 000000000000..931b29651055 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequest.java @@ -0,0 +1,1133 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for listing conversations based on parent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListConversationsRequest} + */ +@com.google.protobuf.Generated +public final class ListConversationsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListConversationsRequest) + ListConversationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListConversationsRequest"); + } + + // Use ListConversationsRequest.newBuilder() to construct. + private ListConversationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListConversationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListConversationsRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * 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. Parent value for ListConversationsRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * 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_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The max page size is `100`. All larger page sizes will be
+   * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+   * default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Returned conversations will match criteria specified within the
+   * filter. ListConversations allows filtering by:
+   * * agents
+   * * labels
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Returned conversations will match criteria specified within the
+   * filter. ListConversations allows filtering by:
+   * * agents
+   * * labels
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListConversationsRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest other = + (com.google.cloud.geminidataanalytics.v1.ListConversationsRequest) 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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest 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.geminidataanalytics.v1.ListConversationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest 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.geminidataanalytics.v1.ListConversationsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListConversationsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing conversations based on parent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListConversationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListConversationsRequest) + com.google.cloud.geminidataanalytics.v1.ListConversationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsRequest build() { + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest result = + new com.google.cloud.geminidataanalytics.v1.ListConversationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListConversationsRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListConversationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.ListConversationsRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListConversationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListConversationsRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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. Parent value for ListConversationsRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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. Parent value for ListConversationsRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListConversationsRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListConversationsRequest.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Returned conversations will match criteria specified within the
+     * filter. ListConversations allows filtering by:
+     * * agents
+     * * labels
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Returned conversations will match criteria specified within the
+     * filter. ListConversations allows filtering by:
+     * * agents
+     * * labels
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Returned conversations will match criteria specified within the
+     * filter. ListConversations allows filtering by:
+     * * agents
+     * * labels
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Returned conversations will match criteria specified within the
+     * filter. ListConversations allows filtering by:
+     * * agents
+     * * labels
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Returned conversations will match criteria specified within the
+     * filter. ListConversations allows filtering by:
+     * * agents
+     * * labels
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListConversationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListConversationsRequest) + private static final com.google.cloud.geminidataanalytics.v1.ListConversationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListConversationsRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListConversationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequestOrBuilder.java new file mode 100644 index 000000000000..1a1812f4df32 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListConversationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListConversationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListConversationsRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListConversationsRequest.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The max page size is `100`. All larger page sizes will be
+   * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+   * default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Returned conversations will match criteria specified within the
+   * filter. ListConversations allows filtering by:
+   * * agents
+   * * labels
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Returned conversations will match criteria specified within the
+   * filter. ListConversations allows filtering by:
+   * * agents
+   * * labels
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponse.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponse.java new file mode 100644 index 000000000000..d5fefd8ab465 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponse.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for response to listing conversations.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListConversationsResponse} + */ +@com.google.protobuf.Generated +public final class ListConversationsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListConversationsResponse) + ListConversationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListConversationsResponse"); + } + + // Use ListConversationsResponse.newBuilder() to construct. + private ListConversationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListConversationsResponse() { + conversations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.Builder.class); + } + + public static final int CONVERSATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List conversations_; + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + @java.lang.Override + public java.util.List + getConversationsList() { + return conversations_; + } + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + @java.lang.Override + public java.util.List + getConversationsOrBuilderList() { + return conversations_; + } + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + @java.lang.Override + public int getConversationsCount() { + return conversations_.size(); + } + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Conversation getConversations(int index) { + return conversations_.get(index); + } + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder getConversationsOrBuilder( + int index) { + return conversations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < conversations_.size(); i++) { + output.writeMessage(1, conversations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conversations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, conversations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListConversationsResponse)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse other = + (com.google.cloud.geminidataanalytics.v1.ListConversationsResponse) obj; + + if (!getConversationsList().equals(other.getConversationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConversationsCount() > 0) { + hash = (37 * hash) + CONVERSATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConversationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse 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.geminidataanalytics.v1.ListConversationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse 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.geminidataanalytics.v1.ListConversationsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListConversationsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing conversations.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListConversationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListConversationsResponse) + com.google.cloud.geminidataanalytics.v1.ListConversationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conversationsBuilder_ == null) { + conversations_ = java.util.Collections.emptyList(); + } else { + conversations_ = null; + conversationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ConversationProto + .internal_static_google_cloud_geminidataanalytics_v1_ListConversationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsResponse build() { + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListConversationsResponse buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse result = + new com.google.cloud.geminidataanalytics.v1.ListConversationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse result) { + if (conversationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conversations_ = java.util.Collections.unmodifiableList(conversations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conversations_ = conversations_; + } else { + result.conversations_ = conversationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListConversationsResponse) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListConversationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.ListConversationsResponse other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListConversationsResponse.getDefaultInstance()) + return this; + if (conversationsBuilder_ == null) { + if (!other.conversations_.isEmpty()) { + if (conversations_.isEmpty()) { + conversations_ = other.conversations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConversationsIsMutable(); + conversations_.addAll(other.conversations_); + } + onChanged(); + } + } else { + if (!other.conversations_.isEmpty()) { + if (conversationsBuilder_.isEmpty()) { + conversationsBuilder_.dispose(); + conversationsBuilder_ = null; + conversations_ = other.conversations_; + bitField0_ = (bitField0_ & ~0x00000001); + conversationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetConversationsFieldBuilder() + : null; + } else { + conversationsBuilder_.addAllMessages(other.conversations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.Conversation m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Conversation.parser(), + extensionRegistry); + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(m); + } else { + conversationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List conversations_ = + java.util.Collections.emptyList(); + + private void ensureConversationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conversations_ = + new java.util.ArrayList( + conversations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder> + conversationsBuilder_; + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public java.util.List + getConversationsList() { + if (conversationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conversations_); + } else { + return conversationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public int getConversationsCount() { + if (conversationsBuilder_ == null) { + return conversations_.size(); + } else { + return conversationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public com.google.cloud.geminidataanalytics.v1.Conversation getConversations(int index) { + if (conversationsBuilder_ == null) { + return conversations_.get(index); + } else { + return conversationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder setConversations( + int index, com.google.cloud.geminidataanalytics.v1.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.set(index, value); + onChanged(); + } else { + conversationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder setConversations( + int index, com.google.cloud.geminidataanalytics.v1.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.set(index, builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder addConversations(com.google.cloud.geminidataanalytics.v1.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.add(value); + onChanged(); + } else { + conversationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder addConversations( + int index, com.google.cloud.geminidataanalytics.v1.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.add(index, value); + onChanged(); + } else { + conversationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder addConversations( + com.google.cloud.geminidataanalytics.v1.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder addConversations( + int index, com.google.cloud.geminidataanalytics.v1.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(index, builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder addAllConversations( + java.lang.Iterable values) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conversations_); + onChanged(); + } else { + conversationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder clearConversations() { + if (conversationsBuilder_ == null) { + conversations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conversationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public Builder removeConversations(int index) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.remove(index); + onChanged(); + } else { + conversationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public com.google.cloud.geminidataanalytics.v1.Conversation.Builder getConversationsBuilder( + int index) { + return internalGetConversationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder getConversationsOrBuilder( + int index) { + if (conversationsBuilder_ == null) { + return conversations_.get(index); + } else { + return conversationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public java.util.List + getConversationsOrBuilderList() { + if (conversationsBuilder_ != null) { + return conversationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conversations_); + } + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public com.google.cloud.geminidataanalytics.v1.Conversation.Builder addConversationsBuilder() { + return internalGetConversationsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public com.google.cloud.geminidataanalytics.v1.Conversation.Builder addConversationsBuilder( + int index) { + return internalGetConversationsFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.Conversation.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of conversations.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + public java.util.List + getConversationsBuilderList() { + return internalGetConversationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder> + internalGetConversationsFieldBuilder() { + if (conversationsBuilder_ == null) { + conversationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Conversation, + com.google.cloud.geminidataanalytics.v1.Conversation.Builder, + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder>( + conversations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conversations_ = null; + } + return conversationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListConversationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListConversationsResponse) + private static final com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListConversationsResponse(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListConversationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListConversationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponseOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponseOrBuilder.java new file mode 100644 index 000000000000..26afaf70af56 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListConversationsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/conversation.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListConversationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListConversationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + java.util.List getConversationsList(); + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + com.google.cloud.geminidataanalytics.v1.Conversation getConversations(int index); + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + int getConversationsCount(); + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + java.util.List + getConversationsOrBuilderList(); + + /** + * + * + *
+   * The list of conversations.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.Conversation conversations = 1; + */ + com.google.cloud.geminidataanalytics.v1.ConversationOrBuilder getConversationsOrBuilder( + int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequest.java new file mode 100644 index 000000000000..01963cb2be9b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequest.java @@ -0,0 +1,1426 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for requesting list of DataAgents.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListDataAgentsRequest} + */ +@com.google.protobuf.Generated +public final class ListDataAgentsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) + ListDataAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDataAgentsRequest"); + } + + // Use ListDataAgentsRequest.newBuilder() to construct. + private ListDataAgentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataAgentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListDataAgentsRequest.
+   * 
+ * + * + * 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. Parent value for ListDataAgentsRequest.
+   * 
+ * + * + * 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_ = 0; + + /** + * + * + *
+   * Optional. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataAgents` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataAgents` must
+   * match the call that provided the page token. The service may return fewer
+   * than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataAgents` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataAgents` must
+   * match the call that provided the page token. The service may return fewer
+   * than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 6; + private boolean showDeleted_ = false; + + /** + * + * + *
+   * Optional. If true, the list results will include soft-deleted DataAgents.
+   * Defaults to false.
+   * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (showDeleted_ != false) { + output.writeBool(6, showDeleted_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, showDeleted_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListDataAgentsRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest other = + (com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) 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 (!getOrderBy().equals(other.getOrderBy())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest 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.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest 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.geminidataanalytics.v1.ListDataAgentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListDataAgentsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of DataAgents.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListDataAgentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.class, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + showDeleted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest build() { + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest result = + new com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.showDeleted_ = showDeleted_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + showDeleted_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListDataAgentsRequest.
+     * 
+ * + * + * 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. Parent value for ListDataAgentsRequest.
+     * 
+ * + * + * 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. Parent value for ListDataAgentsRequest.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListDataAgentsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListDataAgentsRequest.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataAgents` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataAgents` must
+     * match the call that provided the page token. The service may return fewer
+     * than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataAgents` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataAgents` must
+     * match the call that provided the page token. The service may return fewer
+     * than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataAgents` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataAgents` must
+     * match the call that provided the page token. The service may return fewer
+     * than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataAgents` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataAgents` must
+     * match the call that provided the page token. The service may return fewer
+     * than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataAgents` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataAgents` must
+     * match the call that provided the page token. The service may return fewer
+     * than this value.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User specification for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean showDeleted_; + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, the list results will include soft-deleted DataAgents.
+     * Defaults to false.
+     * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000020); + showDeleted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) + private static final com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAgentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListDataAgentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequestOrBuilder.java new file mode 100644 index 000000000000..84c8cd7b4f4e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListDataAgentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListDataAgentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListDataAgentsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListDataAgentsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataAgents` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataAgents` must
+   * match the call that provided the page token. The service may return fewer
+   * than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataAgents` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataAgents` must
+   * match the call that provided the page token. The service may return fewer
+   * than this value.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. User specification for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. If true, the list results will include soft-deleted DataAgents.
+   * Defaults to false.
+   * 
+ * + * bool show_deleted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponse.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponse.java new file mode 100644 index 000000000000..0a83c0c88677 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponse.java @@ -0,0 +1,1418 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for response to listing DataAgents.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListDataAgentsResponse} + */ +@com.google.protobuf.Generated +public final class ListDataAgentsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) + ListDataAgentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDataAgentsResponse"); + } + + // Use ListDataAgentsResponse.newBuilder() to construct. + private ListDataAgentsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataAgentsResponse() { + dataAgents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.Builder.class); + } + + public static final int DATA_AGENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataAgents_; + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public java.util.List getDataAgentsList() { + return dataAgents_; + } + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public java.util.List + getDataAgentsOrBuilderList() { + return dataAgents_; + } + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public int getDataAgentsCount() { + return dataAgents_.size(); + } + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index) { + return dataAgents_.get(index); + } + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder( + int index) { + return dataAgents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < dataAgents_.size(); i++) { + output.writeMessage(1, dataAgents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataAgents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataAgents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListDataAgentsResponse)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse other = + (com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) obj; + + if (!getDataAgentsList().equals(other.getDataAgentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataAgentsCount() > 0) { + hash = (37 * hash) + DATA_AGENTS_FIELD_NUMBER; + hash = (53 * hash) + getDataAgentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse 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.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse 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.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListDataAgentsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing DataAgents.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListDataAgentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.class, + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataAgentsBuilder_ == null) { + dataAgents_ = java.util.Collections.emptyList(); + } else { + dataAgents_ = null; + dataAgentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListDataAgentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse build() { + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse result = + new com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse result) { + if (dataAgentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataAgents_ = java.util.Collections.unmodifiableList(dataAgents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataAgents_ = dataAgents_; + } else { + result.dataAgents_ = dataAgentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse.getDefaultInstance()) + return this; + if (dataAgentsBuilder_ == null) { + if (!other.dataAgents_.isEmpty()) { + if (dataAgents_.isEmpty()) { + dataAgents_ = other.dataAgents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataAgentsIsMutable(); + dataAgents_.addAll(other.dataAgents_); + } + onChanged(); + } + } else { + if (!other.dataAgents_.isEmpty()) { + if (dataAgentsBuilder_.isEmpty()) { + dataAgentsBuilder_.dispose(); + dataAgentsBuilder_ = null; + dataAgents_ = other.dataAgents_; + bitField0_ = (bitField0_ & ~0x00000001); + dataAgentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataAgentsFieldBuilder() + : null; + } else { + dataAgentsBuilder_.addAllMessages(other.dataAgents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.DataAgent m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.DataAgent.parser(), + extensionRegistry); + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(m); + } else { + dataAgentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataAgents_ = + java.util.Collections.emptyList(); + + private void ensureDataAgentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataAgents_ = + new java.util.ArrayList(dataAgents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + dataAgentsBuilder_; + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List getDataAgentsList() { + if (dataAgentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataAgents_); + } else { + return dataAgentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public int getDataAgentsCount() { + if (dataAgentsBuilder_ == null) { + return dataAgents_.size(); + } else { + return dataAgentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index) { + if (dataAgentsBuilder_ == null) { + return dataAgents_.get(index); + } else { + return dataAgentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder setDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.set(index, value); + onChanged(); + } else { + dataAgentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder setDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.set(index, builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.add(value); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAgentsIsMutable(); + dataAgents_.add(index, value); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addDataAgents( + int index, com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.add(index, builderForValue.build()); + onChanged(); + } else { + dataAgentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder addAllDataAgents( + java.lang.Iterable values) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataAgents_); + onChanged(); + } else { + dataAgentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder clearDataAgents() { + if (dataAgentsBuilder_ == null) { + dataAgents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataAgentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public Builder removeDataAgents(int index) { + if (dataAgentsBuilder_ == null) { + ensureDataAgentsIsMutable(); + dataAgents_.remove(index); + onChanged(); + } else { + dataAgentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder getDataAgentsBuilder( + int index) { + return internalGetDataAgentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder( + int index) { + if (dataAgentsBuilder_ == null) { + return dataAgents_.get(index); + } else { + return dataAgentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List + getDataAgentsOrBuilderList() { + if (dataAgentsBuilder_ != null) { + return dataAgentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataAgents_); + } + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder addDataAgentsBuilder() { + return internalGetDataAgentsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder addDataAgentsBuilder( + int index) { + return internalGetDataAgentsFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DataAgent.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + public java.util.List + getDataAgentsBuilderList() { + return internalGetDataAgentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + internalGetDataAgentsFieldBuilder() { + if (dataAgentsBuilder_ == null) { + dataAgentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder>( + dataAgents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataAgents_ = null; + } + return dataAgentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token or empty if none.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) + private static final com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAgentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListDataAgentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponseOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponseOrBuilder.java new file mode 100644 index 000000000000..354853ccf285 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListDataAgentsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListDataAgentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListDataAgentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + java.util.List getDataAgentsList(); + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgents(int index); + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + int getDataAgentsCount(); + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + java.util.List + getDataAgentsOrBuilderList(); + + /** + * + * + *
+   * The list of DataAgent.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.DataAgent data_agents = 1; + */ + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentsOrBuilder(int index); + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequest.java new file mode 100644 index 000000000000..09f9fdaee31d --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequest.java @@ -0,0 +1,1147 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Request for listing chat messages based on parent and conversation_id.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListMessagesRequest} + */ +@com.google.protobuf.Generated +public final class ListMessagesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListMessagesRequest) + ListMessagesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMessagesRequest"); + } + + // Use ListMessagesRequest.newBuilder() to construct. + private ListMessagesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMessagesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.class, + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The conversation to list messages under.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_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 conversation to list messages under.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_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 = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The max page size is `100`. All larger page sizes will be
+   * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+   * default.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   *
+   * ListMessages allows filtering by:
+   * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+   * * update_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   *
+   * ListMessages allows filtering by:
+   * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+   * * update_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListMessagesRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest other = + (com.google.cloud.geminidataanalytics.v1.ListMessagesRequest) 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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest 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.geminidataanalytics.v1.ListMessagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest 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.geminidataanalytics.v1.ListMessagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListMessagesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing chat messages based on parent and conversation_id.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListMessagesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListMessagesRequest) + com.google.cloud.geminidataanalytics.v1.ListMessagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.class, + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesRequest getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesRequest build() { + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListMessagesRequest result = + new com.google.cloud.geminidataanalytics.v1.ListMessagesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.ListMessagesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListMessagesRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListMessagesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ListMessagesRequest other) { + if (other == com.google.cloud.geminidataanalytics.v1.ListMessagesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The conversation to list messages under.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_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 conversation to list messages under.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_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 conversation to list messages under.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The conversation to list messages under.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The conversation to list messages under.
+     * Format:
+     * `projects/{project}/locations/{location}/conversations/{conversation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The max page size is `100`. All larger page sizes will be
+     * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+     * default.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     *
+     * ListMessages allows filtering by:
+     * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+     * * update_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     *
+     * ListMessages allows filtering by:
+     * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+     * * update_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     *
+     * ListMessages allows filtering by:
+     * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+     * * update_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     *
+     * ListMessages allows filtering by:
+     * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+     * * update_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+     * syntax.
+     *
+     * ListMessages allows filtering by:
+     * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+     * * update_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListMessagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListMessagesRequest) + private static final com.google.cloud.geminidataanalytics.v1.ListMessagesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListMessagesRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMessagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListMessagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequestOrBuilder.java new file mode 100644 index 000000000000..9723dbe3f46b --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListMessagesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListMessagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The conversation to list messages under.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The conversation to list messages under.
+   * Format:
+   * `projects/{project}/locations/{location}/conversations/{conversation_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The max page size is `100`. All larger page sizes will be
+   * coerced to `100`. If unspecified, server will pick `50` as an appropriate
+   * default.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   *
+   * ListMessages allows filtering by:
+   * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+   * * update_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
+   * syntax.
+   *
+   * ListMessages allows filtering by:
+   * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
+   * * update_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponse.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponse.java new file mode 100644 index 000000000000..d46ce5bcbb10 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponse.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Response for listing chat messages.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListMessagesResponse} + */ +@com.google.protobuf.Generated +public final class ListMessagesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.ListMessagesResponse) + ListMessagesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMessagesResponse"); + } + + // Use ListMessagesResponse.newBuilder() to construct. + private ListMessagesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMessagesResponse() { + messages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.class, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.Builder.class); + } + + public static final int MESSAGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List messages_; + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + @java.lang.Override + public java.util.List getMessagesList() { + return messages_; + } + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + @java.lang.Override + public java.util.List + getMessagesOrBuilderList() { + return messages_; + } + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + @java.lang.Override + public int getMessagesCount() { + return messages_.size(); + } + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StorageMessage getMessages(int index) { + return messages_.get(index); + } + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder getMessagesOrBuilder( + int index) { + return messages_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < messages_.size(); i++) { + output.writeMessage(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.geminidataanalytics.v1.ListMessagesResponse)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse other = + (com.google.cloud.geminidataanalytics.v1.ListMessagesResponse) obj; + + if (!getMessagesList().equals(other.getMessagesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagesCount() > 0) { + hash = (37 * hash) + MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getMessagesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse 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.geminidataanalytics.v1.ListMessagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse 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.geminidataanalytics.v1.ListMessagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.ListMessagesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing chat messages.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.ListMessagesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.ListMessagesResponse) + com.google.cloud.geminidataanalytics.v1.ListMessagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.class, + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + } else { + messages_ = null; + messagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_ListMessagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesResponse + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesResponse build() { + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ListMessagesResponse buildPartial() { + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse result = + new com.google.cloud.geminidataanalytics.v1.ListMessagesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse result) { + if (messagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messages_ = java.util.Collections.unmodifiableList(messages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messages_ = messages_; + } else { + result.messages_ = messagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.ListMessagesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.ListMessagesResponse) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.ListMessagesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.ListMessagesResponse other) { + if (other + == com.google.cloud.geminidataanalytics.v1.ListMessagesResponse.getDefaultInstance()) + return this; + if (messagesBuilder_ == null) { + if (!other.messages_.isEmpty()) { + if (messages_.isEmpty()) { + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagesIsMutable(); + messages_.addAll(other.messages_); + } + onChanged(); + } + } else { + if (!other.messages_.isEmpty()) { + if (messagesBuilder_.isEmpty()) { + messagesBuilder_.dispose(); + messagesBuilder_ = null; + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + messagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessagesFieldBuilder() + : null; + } else { + messagesBuilder_.addAllMessages(other.messages_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.StorageMessage m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.StorageMessage.parser(), + extensionRegistry); + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(m); + } else { + messagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List messages_ = + java.util.Collections.emptyList(); + + private void ensureMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messages_ = + new java.util.ArrayList( + messages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StorageMessage, + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder, + com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder> + messagesBuilder_; + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public java.util.List + getMessagesList() { + if (messagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(messages_); + } else { + return messagesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public int getMessagesCount() { + if (messagesBuilder_ == null) { + return messages_.size(); + } else { + return messagesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public com.google.cloud.geminidataanalytics.v1.StorageMessage getMessages(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder setMessages( + int index, com.google.cloud.geminidataanalytics.v1.StorageMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.set(index, value); + onChanged(); + } else { + messagesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder setMessages( + int index, com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder addMessages(com.google.cloud.geminidataanalytics.v1.StorageMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(value); + onChanged(); + } else { + messagesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder addMessages( + int index, com.google.cloud.geminidataanalytics.v1.StorageMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(index, value); + onChanged(); + } else { + messagesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder addMessages( + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder addMessages( + int index, com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder addAllMessages( + java.lang.Iterable + values) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_); + onChanged(); + } else { + messagesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder clearMessages() { + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public Builder removeMessages(int index) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.remove(index); + onChanged(); + } else { + messagesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder getMessagesBuilder( + int index) { + return internalGetMessagesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder getMessagesOrBuilder( + int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public java.util.List + getMessagesOrBuilderList() { + if (messagesBuilder_ != null) { + return messagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messages_); + } + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder addMessagesBuilder() { + return internalGetMessagesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.StorageMessage.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder addMessagesBuilder( + int index) { + return internalGetMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.StorageMessage.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of chat messages.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + public java.util.List + getMessagesBuilderList() { + return internalGetMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StorageMessage, + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder, + com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder> + internalGetMessagesFieldBuilder() { + if (messagesBuilder_ == null) { + messagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StorageMessage, + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder, + com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder>( + messages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + messages_ = null; + } + return messagesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.ListMessagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.ListMessagesResponse) + private static final com.google.cloud.geminidataanalytics.v1.ListMessagesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.ListMessagesResponse(); + } + + public static com.google.cloud.geminidataanalytics.v1.ListMessagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMessagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.ListMessagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponseOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponseOrBuilder.java new file mode 100644 index 000000000000..0fb554b6ce24 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/ListMessagesResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface ListMessagesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.ListMessagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + java.util.List getMessagesList(); + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + com.google.cloud.geminidataanalytics.v1.StorageMessage getMessages(int index); + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + int getMessagesCount(); + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + java.util.List + getMessagesOrBuilderList(); + + /** + * + * + *
+   * The list of chat messages.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.StorageMessage messages = 1; + */ + com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder getMessagesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LocationName.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LocationName.java new file mode 100644 index 000000000000..bc6392443733 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1; + +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 LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + 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 (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReference.java new file mode 100644 index 000000000000..971bf0c5fe88 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReference.java @@ -0,0 +1,1823 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing a reference to a single Looker explore.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerExploreReference} + */ +@com.google.protobuf.Generated +public final class LookerExploreReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerExploreReference) + LookerExploreReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookerExploreReference"); + } + + // Use LookerExploreReference.newBuilder() to construct. + private LookerExploreReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookerExploreReference() { + lookmlModel_ = ""; + explore_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.class, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder.class); + } + + private int bitField0_; + private int instanceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object instance_; + + public enum InstanceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOOKER_INSTANCE_URI(9), + PRIVATE_LOOKER_INSTANCE_INFO(10), + INSTANCE_NOT_SET(0); + private final int value; + + private InstanceCase(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 InstanceCase valueOf(int value) { + return forNumber(value); + } + + public static InstanceCase forNumber(int value) { + switch (value) { + case 9: + return LOOKER_INSTANCE_URI; + case 10: + return PRIVATE_LOOKER_INSTANCE_INFO; + case 0: + return INSTANCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InstanceCase getInstanceCase() { + return InstanceCase.forNumber(instanceCase_); + } + + public static final int LOOKER_INSTANCE_URI_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return Whether the lookerInstanceUri field is set. + */ + public boolean hasLookerInstanceUri() { + return instanceCase_ == 9; + } + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return The lookerInstanceUri. + */ + public java.lang.String getLookerInstanceUri() { + java.lang.Object ref = ""; + if (instanceCase_ == 9) { + ref = instance_; + } + 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 (instanceCase_ == 9) { + instance_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return The bytes for lookerInstanceUri. + */ + public com.google.protobuf.ByteString getLookerInstanceUriBytes() { + java.lang.Object ref = ""; + if (instanceCase_ == 9) { + ref = instance_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instanceCase_ == 9) { + instance_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIVATE_LOOKER_INSTANCE_INFO_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return Whether the privateLookerInstanceInfo field is set. + */ + @java.lang.Override + public boolean hasPrivateLookerInstanceInfo() { + return instanceCase_ == 10; + } + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return The privateLookerInstanceInfo. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + getPrivateLookerInstanceInfo() { + if (instanceCase_ == 10) { + return (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_; + } + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder + getPrivateLookerInstanceInfoOrBuilder() { + if (instanceCase_ == 10) { + return (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_; + } + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.getDefaultInstance(); + } + + public static final int LOOKML_MODEL_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object lookmlModel_ = ""; + + /** + * + * + *
+   * Required. Looker model, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML model.
+   * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookmlModel. + */ + @java.lang.Override + public java.lang.String getLookmlModel() { + java.lang.Object ref = lookmlModel_; + 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(); + lookmlModel_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Looker model, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML model.
+   * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookmlModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLookmlModelBytes() { + java.lang.Object ref = lookmlModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookmlModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPLORE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object explore_ = ""; + + /** + * + * + *
+   * Required. Looker Explore, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML Explore.
+   * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + @java.lang.Override + public java.lang.String getExplore() { + java.lang.Object ref = explore_; + 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(); + explore_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Looker Explore, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML Explore.
+   * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExploreBytes() { + java.lang.Object ref = explore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 8; + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookmlModel_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, lookmlModel_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, explore_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getSchema()); + } + if (instanceCase_ == 9) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, instance_); + } + if (instanceCase_ == 10) { + output.writeMessage( + 10, (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookmlModel_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, lookmlModel_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, explore_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSchema()); + } + if (instanceCase_ == 9) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, instance_); + } + if (instanceCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerExploreReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerExploreReference other = + (com.google.cloud.geminidataanalytics.v1.LookerExploreReference) obj; + + if (!getLookmlModel().equals(other.getLookmlModel())) return false; + if (!getExplore().equals(other.getExplore())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (!getInstanceCase().equals(other.getInstanceCase())) return false; + switch (instanceCase_) { + case 9: + if (!getLookerInstanceUri().equals(other.getLookerInstanceUri())) return false; + break; + case 10: + if (!getPrivateLookerInstanceInfo().equals(other.getPrivateLookerInstanceInfo())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LOOKML_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getLookmlModel().hashCode(); + hash = (37 * hash) + EXPLORE_FIELD_NUMBER; + hash = (53 * hash) + getExplore().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + switch (instanceCase_) { + case 9: + hash = (37 * hash) + LOOKER_INSTANCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getLookerInstanceUri().hashCode(); + break; + case 10: + hash = (37 * hash) + PRIVATE_LOOKER_INSTANCE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPrivateLookerInstanceInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference 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.geminidataanalytics.v1.LookerExploreReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference 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.geminidataanalytics.v1.LookerExploreReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerExploreReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing a reference to a single Looker explore.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerExploreReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerExploreReference) + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.class, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerExploreReference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (privateLookerInstanceInfoBuilder_ != null) { + privateLookerInstanceInfoBuilder_.clear(); + } + lookmlModel_ = ""; + explore_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + instanceCase_ = 0; + instance_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference build() { + com.google.cloud.geminidataanalytics.v1.LookerExploreReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerExploreReference result = + new com.google.cloud.geminidataanalytics.v1.LookerExploreReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lookmlModel_ = lookmlModel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.explore_ = explore_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference result) { + result.instanceCase_ = instanceCase_; + result.instance_ = this.instance_; + if (instanceCase_ == 10 && privateLookerInstanceInfoBuilder_ != null) { + result.instance_ = privateLookerInstanceInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerExploreReference) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerExploreReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.LookerExploreReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance()) + return this; + if (!other.getLookmlModel().isEmpty()) { + lookmlModel_ = other.lookmlModel_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getExplore().isEmpty()) { + explore_ = other.explore_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + switch (other.getInstanceCase()) { + case LOOKER_INSTANCE_URI: + { + instanceCase_ = 9; + instance_ = other.instance_; + onChanged(); + break; + } + case PRIVATE_LOOKER_INSTANCE_INFO: + { + mergePrivateLookerInstanceInfo(other.getPrivateLookerInstanceInfo()); + break; + } + case INSTANCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + lookmlModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + explore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 66: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + instanceCase_ = 9; + instance_ = s; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetPrivateLookerInstanceInfoFieldBuilder().getBuilder(), + extensionRegistry); + instanceCase_ = 10; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int instanceCase_ = 0; + private java.lang.Object instance_; + + public InstanceCase getInstanceCase() { + return InstanceCase.forNumber(instanceCase_); + } + + public Builder clearInstance() { + instanceCase_ = 0; + instance_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @return Whether the lookerInstanceUri field is set. + */ + @java.lang.Override + public boolean hasLookerInstanceUri() { + return instanceCase_ == 9; + } + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @return The lookerInstanceUri. + */ + @java.lang.Override + public java.lang.String getLookerInstanceUri() { + java.lang.Object ref = ""; + if (instanceCase_ == 9) { + ref = instance_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (instanceCase_ == 9) { + instance_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @return The bytes for lookerInstanceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLookerInstanceUriBytes() { + java.lang.Object ref = ""; + if (instanceCase_ == 9) { + ref = instance_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instanceCase_ == 9) { + instance_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @param value The lookerInstanceUri to set. + * @return This builder for chaining. + */ + public Builder setLookerInstanceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceCase_ = 9; + instance_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @return This builder for chaining. + */ + public Builder clearLookerInstanceUri() { + if (instanceCase_ == 9) { + instanceCase_ = 0; + instance_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The base url of the Looker instance.
+     * 
+ * + * string looker_instance_uri = 9; + * + * @param value The bytes for lookerInstanceUri to set. + * @return This builder for chaining. + */ + public Builder setLookerInstanceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceCase_ = 9; + instance_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder> + privateLookerInstanceInfoBuilder_; + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return Whether the privateLookerInstanceInfo field is set. + */ + @java.lang.Override + public boolean hasPrivateLookerInstanceInfo() { + return instanceCase_ == 10; + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return The privateLookerInstanceInfo. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + getPrivateLookerInstanceInfo() { + if (privateLookerInstanceInfoBuilder_ == null) { + if (instanceCase_ == 10) { + return (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_; + } + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + .getDefaultInstance(); + } else { + if (instanceCase_ == 10) { + return privateLookerInstanceInfoBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + public Builder setPrivateLookerInstanceInfo( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo value) { + if (privateLookerInstanceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + privateLookerInstanceInfoBuilder_.setMessage(value); + } + instanceCase_ = 10; + return this; + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + public Builder setPrivateLookerInstanceInfo( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder builderForValue) { + if (privateLookerInstanceInfoBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + privateLookerInstanceInfoBuilder_.setMessage(builderForValue.build()); + } + instanceCase_ = 10; + return this; + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + public Builder mergePrivateLookerInstanceInfo( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo value) { + if (privateLookerInstanceInfoBuilder_ == null) { + if (instanceCase_ == 10 + && instance_ + != com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + .getDefaultInstance()) { + instance_ = + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.newBuilder( + (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + if (instanceCase_ == 10) { + privateLookerInstanceInfoBuilder_.mergeFrom(value); + } else { + privateLookerInstanceInfoBuilder_.setMessage(value); + } + } + instanceCase_ = 10; + return this; + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + public Builder clearPrivateLookerInstanceInfo() { + if (privateLookerInstanceInfoBuilder_ == null) { + if (instanceCase_ == 10) { + instanceCase_ = 0; + instance_ = null; + onChanged(); + } + } else { + if (instanceCase_ == 10) { + instanceCase_ = 0; + instance_ = null; + } + privateLookerInstanceInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder + getPrivateLookerInstanceInfoBuilder() { + return internalGetPrivateLookerInstanceInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder + getPrivateLookerInstanceInfoOrBuilder() { + if ((instanceCase_ == 10) && (privateLookerInstanceInfoBuilder_ != null)) { + return privateLookerInstanceInfoBuilder_.getMessageOrBuilder(); + } else { + if (instanceCase_ == 10) { + return (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_; + } + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Private Looker instance info.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder> + internalGetPrivateLookerInstanceInfoFieldBuilder() { + if (privateLookerInstanceInfoBuilder_ == null) { + if (!(instanceCase_ == 10)) { + instance_ = + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + .getDefaultInstance(); + } + privateLookerInstanceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) instance_, + getParentForChildren(), + isClean()); + instance_ = null; + } + instanceCase_ = 10; + onChanged(); + return privateLookerInstanceInfoBuilder_; + } + + private java.lang.Object lookmlModel_ = ""; + + /** + * + * + *
+     * Required. Looker model, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML model.
+     * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookmlModel. + */ + public java.lang.String getLookmlModel() { + java.lang.Object ref = lookmlModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lookmlModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Looker model, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML model.
+     * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookmlModel. + */ + public com.google.protobuf.ByteString getLookmlModelBytes() { + java.lang.Object ref = lookmlModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookmlModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Looker model, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML model.
+     * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lookmlModel to set. + * @return This builder for chaining. + */ + public Builder setLookmlModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lookmlModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Looker model, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML model.
+     * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLookmlModel() { + lookmlModel_ = getDefaultInstance().getLookmlModel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Looker model, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML model.
+     * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for lookmlModel to set. + * @return This builder for chaining. + */ + public Builder setLookmlModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lookmlModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object explore_ = ""; + + /** + * + * + *
+     * Required. Looker Explore, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML Explore.
+     * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + public java.lang.String getExplore() { + java.lang.Object ref = explore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + explore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Looker Explore, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML Explore.
+     * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + public com.google.protobuf.ByteString getExploreBytes() { + java.lang.Object ref = explore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Looker Explore, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML Explore.
+     * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The explore to set. + * @return This builder for chaining. + */ + public Builder setExplore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + explore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Looker Explore, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML Explore.
+     * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExplore() { + explore_ = getDefaultInstance().getExplore(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Looker Explore, as outlined in
+     * [Major LookML
+     * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+     * Name of the LookML Explore.
+     * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for explore to set. + * @return This builder for chaining. + */ + public Builder setExploreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + explore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + public com.google.cloud.geminidataanalytics.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && schema_ != null + && schema_ != com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000010); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance() + : schema_; + } + } + + /** + * + * + *
+     * Optional. The schema of the datasource.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Schema, + com.google.cloud.geminidataanalytics.v1.Schema.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerExploreReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerExploreReference) + private static final com.google.cloud.geminidataanalytics.v1.LookerExploreReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerExploreReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookerExploreReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerExploreReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferenceOrBuilder.java new file mode 100644 index 000000000000..cbf76cbb86d4 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferenceOrBuilder.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface LookerExploreReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerExploreReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return Whether the lookerInstanceUri field is set. + */ + boolean hasLookerInstanceUri(); + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return The lookerInstanceUri. + */ + java.lang.String getLookerInstanceUri(); + + /** + * + * + *
+   * Required. The base url of the Looker instance.
+   * 
+ * + * string looker_instance_uri = 9; + * + * @return The bytes for lookerInstanceUri. + */ + com.google.protobuf.ByteString getLookerInstanceUriBytes(); + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return Whether the privateLookerInstanceInfo field is set. + */ + boolean hasPrivateLookerInstanceInfo(); + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + * + * @return The privateLookerInstanceInfo. + */ + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo getPrivateLookerInstanceInfo(); + + /** + * + * + *
+   * Private Looker instance info.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo private_looker_instance_info = 10; + * + */ + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder + getPrivateLookerInstanceInfoOrBuilder(); + + /** + * + * + *
+   * Required. Looker model, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML model.
+   * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookmlModel. + */ + java.lang.String getLookmlModel(); + + /** + * + * + *
+   * Required. Looker model, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML model.
+   * 
+ * + * string lookml_model = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookmlModel. + */ + com.google.protobuf.ByteString getLookmlModelBytes(); + + /** + * + * + *
+   * Required. Looker Explore, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML Explore.
+   * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + java.lang.String getExplore(); + + /** + * + * + *
+   * Required. Looker Explore, as outlined in
+   * [Major LookML
+   * structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures).
+   * Name of the LookML Explore.
+   * 
+ * + * string explore = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + com.google.protobuf.ByteString getExploreBytes(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.Schema getSchema(); + + /** + * + * + *
+   * Optional. The schema of the datasource.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Schema schema = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder getSchemaOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.InstanceCase getInstanceCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferences.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferences.java new file mode 100644 index 000000000000..13750b243871 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferences.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing references to Looker explores.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerExploreReferences} + */ +@com.google.protobuf.Generated +public final class LookerExploreReferences extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerExploreReferences) + LookerExploreReferencesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookerExploreReferences"); + } + + // Use LookerExploreReferences.newBuilder() to construct. + private LookerExploreReferences(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookerExploreReferences() { + exploreReferences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.class, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder.class); + } + + public static final int EXPLORE_REFERENCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + exploreReferences_; + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getExploreReferencesList() { + return exploreReferences_; + } + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + getExploreReferencesOrBuilderList() { + return exploreReferences_; + } + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getExploreReferencesCount() { + return exploreReferences_.size(); + } + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference getExploreReferences( + int index) { + return exploreReferences_.get(index); + } + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getExploreReferencesOrBuilder(int index) { + return exploreReferences_.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 < exploreReferences_.size(); i++) { + output.writeMessage(1, exploreReferences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < exploreReferences_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, exploreReferences_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerExploreReferences)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences other = + (com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) obj; + + if (!getExploreReferencesList().equals(other.getExploreReferencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExploreReferencesCount() > 0) { + hash = (37 * hash) + EXPLORE_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getExploreReferencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences 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.geminidataanalytics.v1.LookerExploreReferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences 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.geminidataanalytics.v1.LookerExploreReferences parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerExploreReferences 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing references to Looker explores.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerExploreReferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerExploreReferences) + com.google.cloud.geminidataanalytics.v1.LookerExploreReferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.class, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (exploreReferencesBuilder_ == null) { + exploreReferences_ = java.util.Collections.emptyList(); + } else { + exploreReferences_ = null; + exploreReferencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerExploreReferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences build() { + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferences buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences result = + new com.google.cloud.geminidataanalytics.v1.LookerExploreReferences(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences result) { + if (exploreReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + exploreReferences_ = java.util.Collections.unmodifiableList(exploreReferences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.exploreReferences_ = exploreReferences_; + } else { + result.exploreReferences_ = exploreReferencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerExploreReferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.LookerExploreReferences other) { + if (other + == com.google.cloud.geminidataanalytics.v1.LookerExploreReferences.getDefaultInstance()) + return this; + if (exploreReferencesBuilder_ == null) { + if (!other.exploreReferences_.isEmpty()) { + if (exploreReferences_.isEmpty()) { + exploreReferences_ = other.exploreReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExploreReferencesIsMutable(); + exploreReferences_.addAll(other.exploreReferences_); + } + onChanged(); + } + } else { + if (!other.exploreReferences_.isEmpty()) { + if (exploreReferencesBuilder_.isEmpty()) { + exploreReferencesBuilder_.dispose(); + exploreReferencesBuilder_ = null; + exploreReferences_ = other.exploreReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + exploreReferencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExploreReferencesFieldBuilder() + : null; + } else { + exploreReferencesBuilder_.addAllMessages(other.exploreReferences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.LookerExploreReference m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.parser(), + extensionRegistry); + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + exploreReferences_.add(m); + } else { + exploreReferencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + exploreReferences_ = java.util.Collections.emptyList(); + + private void ensureExploreReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + exploreReferences_ = + new java.util.ArrayList( + exploreReferences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + exploreReferencesBuilder_; + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getExploreReferencesList() { + if (exploreReferencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(exploreReferences_); + } else { + return exploreReferencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getExploreReferencesCount() { + if (exploreReferencesBuilder_ == null) { + return exploreReferences_.size(); + } else { + return exploreReferencesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference getExploreReferences( + int index) { + if (exploreReferencesBuilder_ == null) { + return exploreReferences_.get(index); + } else { + return exploreReferencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExploreReferences( + int index, com.google.cloud.geminidataanalytics.v1.LookerExploreReference value) { + if (exploreReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExploreReferencesIsMutable(); + exploreReferences_.set(index, value); + onChanged(); + } else { + exploreReferencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExploreReferences( + int index, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder builderForValue) { + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + exploreReferences_.set(index, builderForValue.build()); + onChanged(); + } else { + exploreReferencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addExploreReferences( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference value) { + if (exploreReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExploreReferencesIsMutable(); + exploreReferences_.add(value); + onChanged(); + } else { + exploreReferencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addExploreReferences( + int index, com.google.cloud.geminidataanalytics.v1.LookerExploreReference value) { + if (exploreReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExploreReferencesIsMutable(); + exploreReferences_.add(index, value); + onChanged(); + } else { + exploreReferencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addExploreReferences( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder builderForValue) { + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + exploreReferences_.add(builderForValue.build()); + onChanged(); + } else { + exploreReferencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addExploreReferences( + int index, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder builderForValue) { + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + exploreReferences_.add(index, builderForValue.build()); + onChanged(); + } else { + exploreReferencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllExploreReferences( + java.lang.Iterable + values) { + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exploreReferences_); + onChanged(); + } else { + exploreReferencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExploreReferences() { + if (exploreReferencesBuilder_ == null) { + exploreReferences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + exploreReferencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeExploreReferences(int index) { + if (exploreReferencesBuilder_ == null) { + ensureExploreReferencesIsMutable(); + exploreReferences_.remove(index); + onChanged(); + } else { + exploreReferencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder + getExploreReferencesBuilder(int index) { + return internalGetExploreReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getExploreReferencesOrBuilder(int index) { + if (exploreReferencesBuilder_ == null) { + return exploreReferences_.get(index); + } else { + return exploreReferencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + getExploreReferencesOrBuilderList() { + if (exploreReferencesBuilder_ != null) { + return exploreReferencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exploreReferences_); + } + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder + addExploreReferencesBuilder() { + return internalGetExploreReferencesFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder + addExploreReferencesBuilder(int index) { + return internalGetExploreReferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. References to Looker explores.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getExploreReferencesBuilderList() { + return internalGetExploreReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder> + internalGetExploreReferencesFieldBuilder() { + if (exploreReferencesBuilder_ == null) { + exploreReferencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerExploreReference, + com.google.cloud.geminidataanalytics.v1.LookerExploreReference.Builder, + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder>( + exploreReferences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + exploreReferences_ = null; + } + return exploreReferencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerExploreReferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerExploreReferences) + private static final com.google.cloud.geminidataanalytics.v1.LookerExploreReferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerExploreReferences(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerExploreReferences + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookerExploreReferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerExploreReferences + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferencesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferencesOrBuilder.java new file mode 100644 index 000000000000..57c13df97a3e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerExploreReferencesOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface LookerExploreReferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerExploreReferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getExploreReferencesList(); + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReference getExploreReferences(int index); + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getExploreReferencesCount(); + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getExploreReferencesOrBuilderList(); + + /** + * + * + *
+   * Required. References to Looker explores.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerExploreReference explore_references = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerExploreReferenceOrBuilder + getExploreReferencesOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQuery.java new file mode 100644 index 000000000000..401b0a82bab0 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQuery.java @@ -0,0 +1,1057 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A golden query for Looker, including natural language questions and a
+ * corresponding Looker Query. Analogous to ExampleQuery.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerGoldenQuery} + */ +@com.google.protobuf.Generated +public final class LookerGoldenQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerGoldenQuery) + LookerGoldenQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookerGoldenQuery"); + } + + // Use LookerGoldenQuery.newBuilder() to construct. + private LookerGoldenQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookerGoldenQuery() { + naturalLanguageQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.class, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder.class); + } + + private int bitField0_; + public static final int NATURAL_LANGUAGE_QUESTIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList naturalLanguageQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the naturalLanguageQuestions. + */ + public com.google.protobuf.ProtocolStringList getNaturalLanguageQuestionsList() { + return naturalLanguageQuestions_; + } + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of naturalLanguageQuestions. + */ + public int getNaturalLanguageQuestionsCount() { + return naturalLanguageQuestions_.size(); + } + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The naturalLanguageQuestions at the given index. + */ + public java.lang.String getNaturalLanguageQuestions(int index) { + return naturalLanguageQuestions_.get(index); + } + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the naturalLanguageQuestions at the given index. + */ + public com.google.protobuf.ByteString getNaturalLanguageQuestionsBytes(int index) { + return naturalLanguageQuestions_.getByteString(index); + } + + public static final int LOOKER_QUERY_FIELD_NUMBER = 5; + private com.google.cloud.geminidataanalytics.v1.LookerQuery lookerQuery_; + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerQuery field is set. + */ + @java.lang.Override + public boolean hasLookerQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery getLookerQuery() { + return lookerQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance() + : lookerQuery_; + } + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerQueryOrBuilder() { + return lookerQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance() + : lookerQuery_; + } + + 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 < naturalLanguageQuestions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 4, naturalLanguageQuestions_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getLookerQuery()); + } + getUnknownFields().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 < naturalLanguageQuestions_.size(); i++) { + dataSize += computeStringSizeNoTag(naturalLanguageQuestions_.getRaw(i)); + } + size += dataSize; + size += 1 * getNaturalLanguageQuestionsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLookerQuery()); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerGoldenQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery other = + (com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery) obj; + + if (!getNaturalLanguageQuestionsList().equals(other.getNaturalLanguageQuestionsList())) + return false; + if (hasLookerQuery() != other.hasLookerQuery()) return false; + if (hasLookerQuery()) { + if (!getLookerQuery().equals(other.getLookerQuery())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNaturalLanguageQuestionsCount() > 0) { + hash = (37 * hash) + NATURAL_LANGUAGE_QUESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getNaturalLanguageQuestionsList().hashCode(); + } + if (hasLookerQuery()) { + hash = (37 * hash) + LOOKER_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getLookerQuery().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery 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.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery 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.geminidataanalytics.v1.LookerGoldenQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerGoldenQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A golden query for Looker, including natural language questions and a
+   * corresponding Looker Query. Analogous to ExampleQuery.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerGoldenQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerGoldenQuery) + com.google.cloud.geminidataanalytics.v1.LookerGoldenQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.class, + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLookerQueryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + naturalLanguageQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + lookerQuery_ = null; + if (lookerQueryBuilder_ != null) { + lookerQueryBuilder_.dispose(); + lookerQueryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerGoldenQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery build() { + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery result = + new com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + naturalLanguageQuestions_.makeImmutable(); + result.naturalLanguageQuestions_ = naturalLanguageQuestions_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lookerQuery_ = + lookerQueryBuilder_ == null ? lookerQuery_ : lookerQueryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery.getDefaultInstance()) + return this; + if (!other.naturalLanguageQuestions_.isEmpty()) { + if (naturalLanguageQuestions_.isEmpty()) { + naturalLanguageQuestions_ = other.naturalLanguageQuestions_; + bitField0_ |= 0x00000001; + } else { + ensureNaturalLanguageQuestionsIsMutable(); + naturalLanguageQuestions_.addAll(other.naturalLanguageQuestions_); + } + onChanged(); + } + if (other.hasLookerQuery()) { + mergeLookerQuery(other.getLookerQuery()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNaturalLanguageQuestionsIsMutable(); + naturalLanguageQuestions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetLookerQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList naturalLanguageQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNaturalLanguageQuestionsIsMutable() { + if (!naturalLanguageQuestions_.isModifiable()) { + naturalLanguageQuestions_ = + new com.google.protobuf.LazyStringArrayList(naturalLanguageQuestions_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the naturalLanguageQuestions. + */ + public com.google.protobuf.ProtocolStringList getNaturalLanguageQuestionsList() { + naturalLanguageQuestions_.makeImmutable(); + return naturalLanguageQuestions_; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of naturalLanguageQuestions. + */ + public int getNaturalLanguageQuestionsCount() { + return naturalLanguageQuestions_.size(); + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The naturalLanguageQuestions at the given index. + */ + public java.lang.String getNaturalLanguageQuestions(int index) { + return naturalLanguageQuestions_.get(index); + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the naturalLanguageQuestions at the given index. + */ + public com.google.protobuf.ByteString getNaturalLanguageQuestionsBytes(int index) { + return naturalLanguageQuestions_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The naturalLanguageQuestions to set. + * @return This builder for chaining. + */ + public Builder setNaturalLanguageQuestions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNaturalLanguageQuestionsIsMutable(); + naturalLanguageQuestions_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The naturalLanguageQuestions to add. + * @return This builder for chaining. + */ + public Builder addNaturalLanguageQuestions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNaturalLanguageQuestionsIsMutable(); + naturalLanguageQuestions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The naturalLanguageQuestions to add. + * @return This builder for chaining. + */ + public Builder addAllNaturalLanguageQuestions(java.lang.Iterable values) { + ensureNaturalLanguageQuestionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, naturalLanguageQuestions_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNaturalLanguageQuestions() { + naturalLanguageQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Natural language questions that a user might ask.
+     * For example: "How many orders were placed last month?"
+     * 
+ * + * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the naturalLanguageQuestions to add. + * @return This builder for chaining. + */ + public Builder addNaturalLanguageQuestionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNaturalLanguageQuestionsIsMutable(); + naturalLanguageQuestions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.LookerQuery lookerQuery_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder> + lookerQueryBuilder_; + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerQuery field is set. + */ + public boolean hasLookerQuery() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerQuery. + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery getLookerQuery() { + if (lookerQueryBuilder_ == null) { + return lookerQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance() + : lookerQuery_; + } else { + return lookerQueryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerQuery(com.google.cloud.geminidataanalytics.v1.LookerQuery value) { + if (lookerQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lookerQuery_ = value; + } else { + lookerQueryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLookerQuery( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder builderForValue) { + if (lookerQueryBuilder_ == null) { + lookerQuery_ = builderForValue.build(); + } else { + lookerQueryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLookerQuery(com.google.cloud.geminidataanalytics.v1.LookerQuery value) { + if (lookerQueryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lookerQuery_ != null + && lookerQuery_ + != com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance()) { + getLookerQueryBuilder().mergeFrom(value); + } else { + lookerQuery_ = value; + } + } else { + lookerQueryBuilder_.mergeFrom(value); + } + if (lookerQuery_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLookerQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + lookerQuery_ = null; + if (lookerQueryBuilder_ != null) { + lookerQueryBuilder_.dispose(); + lookerQueryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder getLookerQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLookerQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerQueryOrBuilder() { + if (lookerQueryBuilder_ != null) { + return lookerQueryBuilder_.getMessageOrBuilder(); + } else { + return lookerQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance() + : lookerQuery_; + } + } + + /** + * + * + *
+     * Optional. The Looker Query corresponding to the natural language questions.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder> + internalGetLookerQueryFieldBuilder() { + if (lookerQueryBuilder_ == null) { + lookerQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder>( + getLookerQuery(), getParentForChildren(), isClean()); + lookerQuery_ = null; + } + return lookerQueryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerGoldenQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerGoldenQuery) + private static final com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerGoldenQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookerGoldenQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerGoldenQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQueryOrBuilder.java new file mode 100644 index 000000000000..001f1d454e49 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerGoldenQueryOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface LookerGoldenQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerGoldenQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the naturalLanguageQuestions. + */ + java.util.List getNaturalLanguageQuestionsList(); + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of naturalLanguageQuestions. + */ + int getNaturalLanguageQuestionsCount(); + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The naturalLanguageQuestions at the given index. + */ + java.lang.String getNaturalLanguageQuestions(int index); + + /** + * + * + *
+   * Optional. Natural language questions that a user might ask.
+   * For example: "How many orders were placed last month?"
+   * 
+ * + * repeated string natural_language_questions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the naturalLanguageQuestions at the given index. + */ + com.google.protobuf.ByteString getNaturalLanguageQuestionsBytes(int index); + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lookerQuery field is set. + */ + boolean hasLookerQuery(); + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lookerQuery. + */ + com.google.cloud.geminidataanalytics.v1.LookerQuery getLookerQuery(); + + /** + * + * + *
+   * Optional. The Looker Query corresponding to the natural language questions.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.LookerQuery looker_query = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder getLookerQueryOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQuery.java new file mode 100644 index 000000000000..5ba875e668c8 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQuery.java @@ -0,0 +1,3571 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Looker Query Object
+ * [Looker API
+ * documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerQuery} + */ +@com.google.protobuf.Generated +public final class LookerQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerQuery) + LookerQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookerQuery"); + } + + // Use LookerQuery.newBuilder() to construct. + private LookerQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookerQuery() { + model_ = ""; + explore_ = ""; + fields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + filters_ = java.util.Collections.emptyList(); + sorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + limit_ = ""; + queryId_ = ""; + clientId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerQuery.class, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder.class); + } + + public interface FilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerQuery.Filter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The field to filter on.
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The field. + */ + java.lang.String getField(); + + /** + * + * + *
+     * Required. The field to filter on.
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + + /** + * + * + *
+   * A Looker query filter.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerQuery.Filter} + */ + public static final class Filter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerQuery.Filter) + FilterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Filter"); + } + + // Use Filter.newBuilder() to construct. + private Filter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Filter() { + field_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.class, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + + /** + * + * + *
+     * Required. The field to filter on.
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The field to filter on.
+     * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The value for the field to filter on.
+     * Optional so we can preserve the default value as an empty
+     * string, important to get a valid and working Looker Explore url.
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, field_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, field_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerQuery.Filter)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter other = + (com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter) obj; + + if (!getField().equals(other.getField())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter 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.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter 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.geminidataanalytics.v1.LookerQuery.Filter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerQuery.Filter 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A Looker query filter.
+     * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerQuery.Filter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerQuery.Filter) + com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.class, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_Filter_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter build() { + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter result = + new com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter other) { + if (other + == com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.getDefaultInstance()) + return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasValue()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object field_ = ""; + + /** + * + * + *
+       * Required. The field to filter on.
+       * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The field to filter on.
+       * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The field to filter on.
+       * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The field to filter on.
+       * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The field to filter on.
+       * 
+ * + * string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The value for the field to filter on.
+       * Optional so we can preserve the default value as an empty
+       * string, important to get a valid and working Looker Explore url.
+       * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerQuery.Filter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerQuery.Filter) + private static final com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Filter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerQuery.Filter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + + /** + * + * + *
+   * Required. The LookML model used to generate the query.
+   * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The LookML model used to generate the query.
+   * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPLORE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object explore_ = ""; + + /** + * + * + *
+   * Required. The LookML explore used to generate the query.
+   * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + @java.lang.Override + public java.lang.String getExplore() { + java.lang.Object ref = explore_; + 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(); + explore_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The LookML explore used to generate the query.
+   * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExploreBytes() { + java.lang.Object ref = explore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList fields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fields. + */ + public com.google.protobuf.ProtocolStringList getFieldsList() { + return fields_; + } + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fields. + */ + public int getFieldsCount() { + return fields_.size(); + } + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fields at the given index. + */ + public java.lang.String getFields(int index) { + return fields_.get(index); + } + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fields at the given index. + */ + public com.google.protobuf.ByteString getFieldsBytes(int index) { + return fields_.getByteString(index); + } + + public static final int FILTERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List filters_; + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFiltersList() { + return filters_; + } + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder> + getFiltersOrBuilderList() { + return filters_; + } + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFiltersCount() { + return filters_.size(); + } + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter getFilters(int index) { + return filters_.get(index); + } + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder getFiltersOrBuilder( + int index) { + return filters_.get(index); + } + + public static final int SORTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sorts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sorts. + */ + public com.google.protobuf.ProtocolStringList getSortsList() { + return sorts_; + } + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sorts. + */ + public int getSortsCount() { + return sorts_.size(); + } + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sorts at the given index. + */ + public java.lang.String getSorts(int index) { + return sorts_.get(index); + } + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sorts at the given index. + */ + public com.google.protobuf.ByteString getSortsBytes(int index) { + return sorts_.getByteString(index); + } + + public static final int LIMIT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object limit_ = ""; + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The limit. + */ + @java.lang.Override + public java.lang.String getLimit() { + java.lang.Object ref = limit_; + 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(); + limit_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for limit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimitBytes() { + java.lang.Object ref = limit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + limit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_ID_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object queryId_ = ""; + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queryId field is set. + */ + @java.lang.Override + public boolean hasQueryId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queryId. + */ + @java.lang.Override + public java.lang.String getQueryId() { + java.lang.Object ref = queryId_; + 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(); + queryId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for queryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryIdBytes() { + java.lang.Object ref = queryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_ID_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clientId field is set. + */ + @java.lang.Override + public boolean hasClientId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + 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(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, explore_); + } + for (int i = 0; i < fields_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, fields_.getRaw(i)); + } + for (int i = 0; i < filters_.size(); i++) { + output.writeMessage(4, filters_.get(i)); + } + for (int i = 0; i < sorts_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, sorts_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, limit_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, queryId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, clientId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, explore_); + } + { + int dataSize = 0; + for (int i = 0; i < fields_.size(); i++) { + dataSize += computeStringSizeNoTag(fields_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldsList().size(); + } + for (int i = 0; i < filters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, filters_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < sorts_.size(); i++) { + dataSize += computeStringSizeNoTag(sorts_.getRaw(i)); + } + size += dataSize; + size += 1 * getSortsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, limit_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, queryId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, clientId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerQuery other = + (com.google.cloud.geminidataanalytics.v1.LookerQuery) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getExplore().equals(other.getExplore())) return false; + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!getFiltersList().equals(other.getFiltersList())) return false; + if (!getSortsList().equals(other.getSortsList())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit().equals(other.getLimit())) return false; + } + if (hasQueryId() != other.hasQueryId()) return false; + if (hasQueryId()) { + if (!getQueryId().equals(other.getQueryId())) return false; + } + if (hasClientId() != other.hasClientId()) return false; + if (hasClientId()) { + if (!getClientId().equals(other.getClientId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + EXPLORE_FIELD_NUMBER; + hash = (53 * hash) + getExplore().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + if (getFiltersCount() > 0) { + hash = (37 * hash) + FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getFiltersList().hashCode(); + } + if (getSortsCount() > 0) { + hash = (37 * hash) + SORTS_FIELD_NUMBER; + hash = (53 * hash) + getSortsList().hashCode(); + } + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasQueryId()) { + hash = (37 * hash) + QUERY_ID_FIELD_NUMBER; + hash = (53 * hash) + getQueryId().hashCode(); + } + if (hasClientId()) { + hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery 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.geminidataanalytics.v1.LookerQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery 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.geminidataanalytics.v1.LookerQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Looker Query Object
+   * [Looker API
+   * documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerQuery) + com.google.cloud.geminidataanalytics.v1.LookerQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerQuery.class, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + explore_ = ""; + fields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + } else { + filters_ = null; + filtersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + sorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + limit_ = ""; + queryId_ = ""; + clientId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery build() { + com.google.cloud.geminidataanalytics.v1.LookerQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerQuery result = + new com.google.cloud.geminidataanalytics.v1.LookerQuery(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.LookerQuery result) { + if (filtersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + filters_ = java.util.Collections.unmodifiableList(filters_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.filters_ = filters_; + } else { + result.filters_ = filtersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.LookerQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.explore_ = explore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + fields_.makeImmutable(); + result.fields_ = fields_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + sorts_.makeImmutable(); + result.sorts_ = sorts_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.limit_ = limit_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.queryId_ = queryId_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.clientId_ = clientId_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.LookerQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.LookerQuery.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExplore().isEmpty()) { + explore_ = other.explore_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ |= 0x00000004; + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + if (filtersBuilder_ == null) { + if (!other.filters_.isEmpty()) { + if (filters_.isEmpty()) { + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFiltersIsMutable(); + filters_.addAll(other.filters_); + } + onChanged(); + } + } else { + if (!other.filters_.isEmpty()) { + if (filtersBuilder_.isEmpty()) { + filtersBuilder_.dispose(); + filtersBuilder_ = null; + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000008); + filtersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFiltersFieldBuilder() + : null; + } else { + filtersBuilder_.addAllMessages(other.filters_); + } + } + } + if (!other.sorts_.isEmpty()) { + if (sorts_.isEmpty()) { + sorts_ = other.sorts_; + bitField0_ |= 0x00000010; + } else { + ensureSortsIsMutable(); + sorts_.addAll(other.sorts_); + } + onChanged(); + } + if (other.hasLimit()) { + limit_ = other.limit_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasQueryId()) { + queryId_ = other.queryId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasClientId()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + explore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFieldsIsMutable(); + fields_.add(s); + break; + } // case 26 + case 34: + { + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.parser(), + extensionRegistry); + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(m); + } else { + filtersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSortsIsMutable(); + sorts_.add(s); + break; + } // case 42 + case 50: + { + limit_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 82: + { + queryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 82 + case 90: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object model_ = ""; + + /** + * + * + *
+     * Required. The LookML model used to generate the query.
+     * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The LookML model used to generate the query.
+     * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The LookML model used to generate the query.
+     * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The LookML model used to generate the query.
+     * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The LookML model used to generate the query.
+     * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object explore_ = ""; + + /** + * + * + *
+     * Required. The LookML explore used to generate the query.
+     * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + public java.lang.String getExplore() { + java.lang.Object ref = explore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + explore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The LookML explore used to generate the query.
+     * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + public com.google.protobuf.ByteString getExploreBytes() { + java.lang.Object ref = explore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The LookML explore used to generate the query.
+     * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The explore to set. + * @return This builder for chaining. + */ + public Builder setExplore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + explore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The LookML explore used to generate the query.
+     * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExplore() { + explore_ = getDefaultInstance().getExplore(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The LookML explore used to generate the query.
+     * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for explore to set. + * @return This builder for chaining. + */ + public Builder setExploreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + explore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList fields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFieldsIsMutable() { + if (!fields_.isModifiable()) { + fields_ = new com.google.protobuf.LazyStringArrayList(fields_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fields. + */ + public com.google.protobuf.ProtocolStringList getFieldsList() { + fields_.makeImmutable(); + return fields_; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fields. + */ + public int getFieldsCount() { + return fields_.size(); + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fields at the given index. + */ + public java.lang.String getFields(int index) { + return fields_.get(index); + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fields at the given index. + */ + public com.google.protobuf.ByteString getFieldsBytes(int index) { + return fields_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The fields to set. + * @return This builder for chaining. + */ + public Builder setFields(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fields to add. + * @return This builder for chaining. + */ + public Builder addFields(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The fields to add. + * @return This builder for chaining. + */ + public Builder addAllFields(java.lang.Iterable values) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFields() { + fields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fields to retrieve from the explore.
+     * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the fields to add. + * @return This builder for chaining. + */ + public Builder addFieldsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldsIsMutable(); + fields_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List filters_ = + java.util.Collections.emptyList(); + + private void ensureFiltersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + filters_ = + new java.util.ArrayList( + filters_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder> + filtersBuilder_; + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFiltersList() { + if (filtersBuilder_ == null) { + return java.util.Collections.unmodifiableList(filters_); + } else { + return filtersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFiltersCount() { + if (filtersBuilder_ == null) { + return filters_.size(); + } else { + return filtersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter getFilters(int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); + } else { + return filtersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilters( + int index, com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.set(index, value); + onChanged(); + } else { + filtersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilters( + int index, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.set(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters(com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(value); + onChanged(); + } else { + filtersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters( + int index, com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(index, value); + onChanged(); + } else { + filtersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters( + int index, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFilters( + java.lang.Iterable + values) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filters_); + onChanged(); + } else { + filtersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFilters() { + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + filtersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFilters(int index) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.remove(index); + onChanged(); + } else { + filtersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder getFiltersBuilder( + int index) { + return internalGetFiltersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder getFiltersOrBuilder( + int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); + } else { + return filtersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder> + getFiltersOrBuilderList() { + if (filtersBuilder_ != null) { + return filtersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filters_); + } + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder addFiltersBuilder() { + return internalGetFiltersFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder addFiltersBuilder( + int index) { + return internalGetFiltersFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The filters to apply to the explore.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFiltersBuilderList() { + return internalGetFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder> + internalGetFiltersFieldBuilder() { + if (filtersBuilder_ == null) { + filtersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter, + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter.Builder, + com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder>( + filters_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + filters_ = null; + } + return filtersBuilder_; + } + + private com.google.protobuf.LazyStringArrayList sorts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSortsIsMutable() { + if (!sorts_.isModifiable()) { + sorts_ = new com.google.protobuf.LazyStringArrayList(sorts_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sorts. + */ + public com.google.protobuf.ProtocolStringList getSortsList() { + sorts_.makeImmutable(); + return sorts_; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sorts. + */ + public int getSortsCount() { + return sorts_.size(); + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sorts at the given index. + */ + public java.lang.String getSorts(int index) { + return sorts_.get(index); + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sorts at the given index. + */ + public com.google.protobuf.ByteString getSortsBytes(int index) { + return sorts_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The sorts to set. + * @return This builder for chaining. + */ + public Builder setSorts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSortsIsMutable(); + sorts_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sorts to add. + * @return This builder for chaining. + */ + public Builder addSorts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSortsIsMutable(); + sorts_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The sorts to add. + * @return This builder for chaining. + */ + public Builder addAllSorts(java.lang.Iterable values) { + ensureSortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sorts_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSorts() { + sorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sorts to apply to the explore.
+     * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the sorts to add. + * @return This builder for chaining. + */ + public Builder addSortsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSortsIsMutable(); + sorts_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object limit_ = ""; + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The limit. + */ + public java.lang.String getLimit() { + java.lang.Object ref = limit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + limit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for limit. + */ + public com.google.protobuf.ByteString getLimitBytes() { + java.lang.Object ref = limit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + limit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLimit() { + limit_ = getDefaultInstance().getLimit(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Limit in the query.
+     * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for limit to set. + * @return This builder for chaining. + */ + public Builder setLimitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + limit_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object queryId_ = ""; + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queryId field is set. + */ + public boolean hasQueryId() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queryId. + */ + public java.lang.String getQueryId() { + java.lang.Object ref = queryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for queryId. + */ + public com.google.protobuf.ByteString getQueryIdBytes() { + java.lang.Object ref = queryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The queryId to set. + * @return This builder for chaining. + */ + public Builder setQueryId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQueryId() { + queryId_ = getDefaultInstance().getQueryId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The primary identifier for the query resource in Looker, used for
+     * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+     * resource.
+     * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for queryId to set. + * @return This builder for chaining. + */ + public Builder setQueryIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object clientId_ = ""; + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clientId field is set. + */ + public boolean hasClientId() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The short alphanumeric identifier for the query, used for share
+     * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+     * in the Looker API `Query` resource.
+     * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerQuery) + private static final com.google.cloud.geminidataanalytics.v1.LookerQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookerQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQueryOrBuilder.java new file mode 100644 index 000000000000..7c9e234317dc --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerQueryOrBuilder.java @@ -0,0 +1,384 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface LookerQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The LookML model used to generate the query.
+   * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The model. + */ + java.lang.String getModel(); + + /** + * + * + *
+   * Required. The LookML model used to generate the query.
+   * 
+ * + * string model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Required. The LookML explore used to generate the query.
+   * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The explore. + */ + java.lang.String getExplore(); + + /** + * + * + *
+   * Required. The LookML explore used to generate the query.
+   * 
+ * + * string explore = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for explore. + */ + com.google.protobuf.ByteString getExploreBytes(); + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fields. + */ + java.util.List getFieldsList(); + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fields. + */ + int getFieldsCount(); + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fields at the given index. + */ + java.lang.String getFields(int index); + + /** + * + * + *
+   * Optional. The fields to retrieve from the explore.
+   * 
+ * + * repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fields at the given index. + */ + com.google.protobuf.ByteString getFieldsBytes(int index); + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFiltersList(); + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerQuery.Filter getFilters(int index); + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFiltersCount(); + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFiltersOrBuilderList(); + + /** + * + * + *
+   * Optional. The filters to apply to the explore.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.LookerQuery.FilterOrBuilder getFiltersOrBuilder( + int index); + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sorts. + */ + java.util.List getSortsList(); + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sorts. + */ + int getSortsCount(); + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sorts at the given index. + */ + java.lang.String getSorts(int index); + + /** + * + * + *
+   * Optional. The sorts to apply to the explore.
+   * 
+ * + * repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sorts at the given index. + */ + com.google.protobuf.ByteString getSortsBytes(int index); + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the limit field is set. + */ + boolean hasLimit(); + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The limit. + */ + java.lang.String getLimit(); + + /** + * + * + *
+   * Optional. Limit in the query.
+   * 
+ * + * optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for limit. + */ + com.google.protobuf.ByteString getLimitBytes(); + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queryId field is set. + */ + boolean hasQueryId(); + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queryId. + */ + java.lang.String getQueryId(); + + /** + * + * + *
+   * Optional. The primary identifier for the query resource in Looker, used for
+   * API operations. Maps to `id` (or `slug`) in the Looker API `Query`
+   * resource.
+   * 
+ * + * optional string query_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for queryId. + */ + com.google.protobuf.ByteString getQueryIdBytes(); + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clientId field is set. + */ + boolean hasClientId(); + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
+   * Optional. The short alphanumeric identifier for the query, used for share
+   * links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id`
+   * in the Looker API `Query` resource.
+   * 
+ * + * optional string client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettings.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettings.java new file mode 100644 index 000000000000..72c20e4be8cb --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettings.java @@ -0,0 +1,524 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message to hold Looker specific custom settings.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerSettings} + */ +@com.google.protobuf.Generated +public final class LookerSettings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.LookerSettings) + LookerSettingsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookerSettings"); + } + + // Use LookerSettings.newBuilder() to construct. + private LookerSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookerSettings() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerSettings.class, + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder.class); + } + + public static final int ENABLE_DEV_MODE_FIELD_NUMBER = 1; + private boolean enableDevMode_ = false; + + /** + * + * + *
+   * Optional. Whether to operate in Looker's Development Mode.
+   * If true, the API session will be switched to the "dev" workspace,
+   * allowing interaction with LookML changes in the user's development branch.
+   * If false or unset, the session remains in the default state (Production
+   * Mode).
+   * See https://cloud.google.com/looker/docs/dev-mode-prod-mode.
+   * 
+ * + * bool enable_dev_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDevMode. + */ + @java.lang.Override + public boolean getEnableDevMode() { + return enableDevMode_; + } + + 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 (enableDevMode_ != false) { + output.writeBool(1, enableDevMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableDevMode_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableDevMode_); + } + size += getUnknownFields().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.geminidataanalytics.v1.LookerSettings)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.LookerSettings other = + (com.google.cloud.geminidataanalytics.v1.LookerSettings) obj; + + if (getEnableDevMode() != other.getEnableDevMode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ENABLE_DEV_MODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDevMode()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings 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.geminidataanalytics.v1.LookerSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings 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.geminidataanalytics.v1.LookerSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.LookerSettings 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message to hold Looker specific custom settings.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.LookerSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.LookerSettings) + com.google.cloud.geminidataanalytics.v1.LookerSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.LookerSettings.class, + com.google.cloud.geminidataanalytics.v1.LookerSettings.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.LookerSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableDevMode_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_LookerSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettings getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettings build() { + com.google.cloud.geminidataanalytics.v1.LookerSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.LookerSettings buildPartial() { + com.google.cloud.geminidataanalytics.v1.LookerSettings result = + new com.google.cloud.geminidataanalytics.v1.LookerSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.LookerSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableDevMode_ = enableDevMode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.LookerSettings) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.LookerSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.LookerSettings other) { + if (other == com.google.cloud.geminidataanalytics.v1.LookerSettings.getDefaultInstance()) + return this; + if (other.getEnableDevMode() != false) { + setEnableDevMode(other.getEnableDevMode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableDevMode_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableDevMode_; + + /** + * + * + *
+     * Optional. Whether to operate in Looker's Development Mode.
+     * If true, the API session will be switched to the "dev" workspace,
+     * allowing interaction with LookML changes in the user's development branch.
+     * If false or unset, the session remains in the default state (Production
+     * Mode).
+     * See https://cloud.google.com/looker/docs/dev-mode-prod-mode.
+     * 
+ * + * bool enable_dev_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDevMode. + */ + @java.lang.Override + public boolean getEnableDevMode() { + return enableDevMode_; + } + + /** + * + * + *
+     * Optional. Whether to operate in Looker's Development Mode.
+     * If true, the API session will be switched to the "dev" workspace,
+     * allowing interaction with LookML changes in the user's development branch.
+     * If false or unset, the session remains in the default state (Production
+     * Mode).
+     * See https://cloud.google.com/looker/docs/dev-mode-prod-mode.
+     * 
+ * + * bool enable_dev_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableDevMode to set. + * @return This builder for chaining. + */ + public Builder setEnableDevMode(boolean value) { + + enableDevMode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to operate in Looker's Development Mode.
+     * If true, the API session will be switched to the "dev" workspace,
+     * allowing interaction with LookML changes in the user's development branch.
+     * If false or unset, the session remains in the default state (Production
+     * Mode).
+     * See https://cloud.google.com/looker/docs/dev-mode-prod-mode.
+     * 
+ * + * bool enable_dev_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableDevMode() { + bitField0_ = (bitField0_ & ~0x00000001); + enableDevMode_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.LookerSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.LookerSettings) + private static final com.google.cloud.geminidataanalytics.v1.LookerSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.LookerSettings(); + } + + public static com.google.cloud.geminidataanalytics.v1.LookerSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookerSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.LookerSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettingsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettingsOrBuilder.java new file mode 100644 index 000000000000..e50c2cebfa37 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/LookerSettingsOrBuilder.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface LookerSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.LookerSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether to operate in Looker's Development Mode.
+   * If true, the API session will be switched to the "dev" workspace,
+   * allowing interaction with LookML changes in the user's development branch.
+   * If false or unset, the session remains in the default state (Production
+   * Mode).
+   * See https://cloud.google.com/looker/docs/dev-mode-prod-mode.
+   * 
+ * + * bool enable_dev_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDevMode. + */ + boolean getEnableDevMode(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQuery.java new file mode 100644 index 000000000000..fe43bbeec11f --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQuery.java @@ -0,0 +1,1298 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A matched query message represents the agent having matched one of the
+ * example queries supplied in context as being applicable to the current
+ * question. It will also contain additional info during the matching process.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.MatchedQuery} + */ +@com.google.protobuf.Generated +public final class MatchedQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.MatchedQuery) + MatchedQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MatchedQuery"); + } + + // Use MatchedQuery.newBuilder() to construct. + private MatchedQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MatchedQuery() { + queryParameterValues_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.MatchedQuery.class, + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder.class); + } + + private int bitField0_; + public static final int EXAMPLE_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.geminidataanalytics.v1.ExampleQuery exampleQuery_; + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return Whether the exampleQuery field is set. + */ + @java.lang.Override + public boolean hasExampleQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return The exampleQuery. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery() { + return exampleQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance() + : exampleQuery_; + } + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueryOrBuilder() { + return exampleQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance() + : exampleQuery_; + } + + public static final int QUERY_PARAMETER_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + queryParameterValues_; + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + @java.lang.Override + public java.util.List + getQueryParameterValuesList() { + return queryParameterValues_; + } + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder> + getQueryParameterValuesOrBuilderList() { + return queryParameterValues_; + } + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + @java.lang.Override + public int getQueryParameterValuesCount() { + return queryParameterValues_.size(); + } + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues getQueryParameterValues( + int index) { + return queryParameterValues_.get(index); + } + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder + getQueryParameterValuesOrBuilder(int index) { + return queryParameterValues_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getExampleQuery()); + } + for (int i = 0; i < queryParameterValues_.size(); i++) { + output.writeMessage(2, queryParameterValues_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExampleQuery()); + } + for (int i = 0; i < queryParameterValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, queryParameterValues_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.MatchedQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.MatchedQuery other = + (com.google.cloud.geminidataanalytics.v1.MatchedQuery) obj; + + if (hasExampleQuery() != other.hasExampleQuery()) return false; + if (hasExampleQuery()) { + if (!getExampleQuery().equals(other.getExampleQuery())) return false; + } + if (!getQueryParameterValuesList().equals(other.getQueryParameterValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExampleQuery()) { + hash = (37 * hash) + EXAMPLE_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getExampleQuery().hashCode(); + } + if (getQueryParameterValuesCount() > 0) { + hash = (37 * hash) + QUERY_PARAMETER_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQueryParameterValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery 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.geminidataanalytics.v1.MatchedQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery 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.geminidataanalytics.v1.MatchedQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.MatchedQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A matched query message represents the agent having matched one of the
+   * example queries supplied in context as being applicable to the current
+   * question. It will also contain additional info during the matching process.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.MatchedQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.MatchedQuery) + com.google.cloud.geminidataanalytics.v1.MatchedQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.MatchedQuery.class, + com.google.cloud.geminidataanalytics.v1.MatchedQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.MatchedQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExampleQueryFieldBuilder(); + internalGetQueryParameterValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + exampleQuery_ = null; + if (exampleQueryBuilder_ != null) { + exampleQueryBuilder_.dispose(); + exampleQueryBuilder_ = null; + } + if (queryParameterValuesBuilder_ == null) { + queryParameterValues_ = java.util.Collections.emptyList(); + } else { + queryParameterValues_ = null; + queryParameterValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_MatchedQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQuery build() { + com.google.cloud.geminidataanalytics.v1.MatchedQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MatchedQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.MatchedQuery result = + new com.google.cloud.geminidataanalytics.v1.MatchedQuery(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.MatchedQuery result) { + if (queryParameterValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + queryParameterValues_ = java.util.Collections.unmodifiableList(queryParameterValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.queryParameterValues_ = queryParameterValues_; + } else { + result.queryParameterValues_ = queryParameterValuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.MatchedQuery result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.exampleQuery_ = + exampleQueryBuilder_ == null ? exampleQuery_ : exampleQueryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.MatchedQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.MatchedQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.MatchedQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.MatchedQuery.getDefaultInstance()) + return this; + if (other.hasExampleQuery()) { + mergeExampleQuery(other.getExampleQuery()); + } + if (queryParameterValuesBuilder_ == null) { + if (!other.queryParameterValues_.isEmpty()) { + if (queryParameterValues_.isEmpty()) { + queryParameterValues_ = other.queryParameterValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.addAll(other.queryParameterValues_); + } + onChanged(); + } + } else { + if (!other.queryParameterValues_.isEmpty()) { + if (queryParameterValuesBuilder_.isEmpty()) { + queryParameterValuesBuilder_.dispose(); + queryParameterValuesBuilder_ = null; + queryParameterValues_ = other.queryParameterValues_; + bitField0_ = (bitField0_ & ~0x00000002); + queryParameterValuesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetQueryParameterValuesFieldBuilder() + : null; + } else { + queryParameterValuesBuilder_.addAllMessages(other.queryParameterValues_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetExampleQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.geminidataanalytics.v1.QueryParameterValues m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.parser(), + extensionRegistry); + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.add(m); + } else { + queryParameterValuesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.geminidataanalytics.v1.ExampleQuery exampleQuery_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + exampleQueryBuilder_; + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return Whether the exampleQuery field is set. + */ + public boolean hasExampleQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return The exampleQuery. + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery() { + if (exampleQueryBuilder_ == null) { + return exampleQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance() + : exampleQuery_; + } else { + return exampleQueryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public Builder setExampleQuery(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exampleQuery_ = value; + } else { + exampleQueryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public Builder setExampleQuery( + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder builderForValue) { + if (exampleQueryBuilder_ == null) { + exampleQuery_ = builderForValue.build(); + } else { + exampleQueryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public Builder mergeExampleQuery(com.google.cloud.geminidataanalytics.v1.ExampleQuery value) { + if (exampleQueryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && exampleQuery_ != null + && exampleQuery_ + != com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance()) { + getExampleQueryBuilder().mergeFrom(value); + } else { + exampleQuery_ = value; + } + } else { + exampleQueryBuilder_.mergeFrom(value); + } + if (exampleQuery_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public Builder clearExampleQuery() { + bitField0_ = (bitField0_ & ~0x00000001); + exampleQuery_ = null; + if (exampleQueryBuilder_ != null) { + exampleQueryBuilder_.dispose(); + exampleQueryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder getExampleQueryBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetExampleQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder + getExampleQueryOrBuilder() { + if (exampleQueryBuilder_ != null) { + return exampleQueryBuilder_.getMessageOrBuilder(); + } else { + return exampleQuery_ == null + ? com.google.cloud.geminidataanalytics.v1.ExampleQuery.getDefaultInstance() + : exampleQuery_; + } + } + + /** + * + * + *
+     * The query that was matched based on an example query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder> + internalGetExampleQueryFieldBuilder() { + if (exampleQueryBuilder_ == null) { + exampleQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQuery, + com.google.cloud.geminidataanalytics.v1.ExampleQuery.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder>( + getExampleQuery(), getParentForChildren(), isClean()); + exampleQuery_ = null; + } + return exampleQueryBuilder_; + } + + private java.util.List + queryParameterValues_ = java.util.Collections.emptyList(); + + private void ensureQueryParameterValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + queryParameterValues_ = + new java.util.ArrayList( + queryParameterValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameterValues, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder> + queryParameterValuesBuilder_; + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public java.util.List + getQueryParameterValuesList() { + if (queryParameterValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(queryParameterValues_); + } else { + return queryParameterValuesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public int getQueryParameterValuesCount() { + if (queryParameterValuesBuilder_ == null) { + return queryParameterValues_.size(); + } else { + return queryParameterValuesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues getQueryParameterValues( + int index) { + if (queryParameterValuesBuilder_ == null) { + return queryParameterValues_.get(index); + } else { + return queryParameterValuesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder setQueryParameterValues( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameterValues value) { + if (queryParameterValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.set(index, value); + onChanged(); + } else { + queryParameterValuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder setQueryParameterValues( + int index, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder builderForValue) { + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.set(index, builderForValue.build()); + onChanged(); + } else { + queryParameterValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder addQueryParameterValues( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues value) { + if (queryParameterValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.add(value); + onChanged(); + } else { + queryParameterValuesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder addQueryParameterValues( + int index, com.google.cloud.geminidataanalytics.v1.QueryParameterValues value) { + if (queryParameterValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.add(index, value); + onChanged(); + } else { + queryParameterValuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder addQueryParameterValues( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder builderForValue) { + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.add(builderForValue.build()); + onChanged(); + } else { + queryParameterValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder addQueryParameterValues( + int index, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder builderForValue) { + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.add(index, builderForValue.build()); + onChanged(); + } else { + queryParameterValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder addAllQueryParameterValues( + java.lang.Iterable + values) { + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queryParameterValues_); + onChanged(); + } else { + queryParameterValuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder clearQueryParameterValues() { + if (queryParameterValuesBuilder_ == null) { + queryParameterValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + queryParameterValuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public Builder removeQueryParameterValues(int index) { + if (queryParameterValuesBuilder_ == null) { + ensureQueryParameterValuesIsMutable(); + queryParameterValues_.remove(index); + onChanged(); + } else { + queryParameterValuesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder + getQueryParameterValuesBuilder(int index) { + return internalGetQueryParameterValuesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder + getQueryParameterValuesOrBuilder(int index) { + if (queryParameterValuesBuilder_ == null) { + return queryParameterValues_.get(index); + } else { + return queryParameterValuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder> + getQueryParameterValuesOrBuilderList() { + if (queryParameterValuesBuilder_ != null) { + return queryParameterValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queryParameterValues_); + } + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder + addQueryParameterValuesBuilder() { + return internalGetQueryParameterValuesFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.getDefaultInstance()); + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder + addQueryParameterValuesBuilder(int index) { + return internalGetQueryParameterValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.getDefaultInstance()); + } + + /** + * + * + *
+     * The extracted values for the query parameters.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + public java.util.List + getQueryParameterValuesBuilderList() { + return internalGetQueryParameterValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameterValues, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder> + internalGetQueryParameterValuesFieldBuilder() { + if (queryParameterValuesBuilder_ == null) { + queryParameterValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.QueryParameterValues, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder, + com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder>( + queryParameterValues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + queryParameterValues_ = null; + } + return queryParameterValuesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.MatchedQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.MatchedQuery) + private static final com.google.cloud.geminidataanalytics.v1.MatchedQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.MatchedQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.MatchedQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchedQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.MatchedQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQueryOrBuilder.java new file mode 100644 index 000000000000..0b51e3e27db6 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MatchedQueryOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface MatchedQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.MatchedQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return Whether the exampleQuery field is set. + */ + boolean hasExampleQuery(); + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + * + * @return The exampleQuery. + */ + com.google.cloud.geminidataanalytics.v1.ExampleQuery getExampleQuery(); + + /** + * + * + *
+   * The query that was matched based on an example query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ExampleQuery example_query = 1; + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueryOrBuilder getExampleQueryOrBuilder(); + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + java.util.List + getQueryParameterValuesList(); + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + com.google.cloud.geminidataanalytics.v1.QueryParameterValues getQueryParameterValues(int index); + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + int getQueryParameterValuesCount(); + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + java.util.List + getQueryParameterValuesOrBuilderList(); + + /** + * + * + *
+   * The extracted values for the query parameters.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.QueryParameterValues query_parameter_values = 2; + * + */ + com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder + getQueryParameterValuesOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Message.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Message.java new file mode 100644 index 000000000000..39f72b612d28 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Message.java @@ -0,0 +1,1616 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message from an interaction between the user and the system.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Message} + */ +@com.google.protobuf.Generated +public final class Message extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Message) + MessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Message"); + } + + // Use Message.newBuilder() to construct. + private Message(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Message() { + messageId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Message_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Message_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Message.class, + com.google.cloud.geminidataanalytics.v1.Message.Builder.class); + } + + private int bitField0_; + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_MESSAGE(2), + SYSTEM_MESSAGE(3), + 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 2: + return USER_MESSAGE; + case 3: + return SYSTEM_MESSAGE; + 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 USER_MESSAGE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return Whether the userMessage field is set. + */ + @java.lang.Override + public boolean hasUserMessage() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return The userMessage. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessage getUserMessage() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder getUserMessageOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + + public static final int SYSTEM_MESSAGE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return Whether the systemMessage field is set. + */ + @java.lang.Override + public boolean hasSystemMessage() { + return kindCase_ == 3; + } + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return The systemMessage. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessage getSystemMessage() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder + getSystemMessageOrBuilder() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp timestamp_; + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + + /** + * + * + *
+   * Optional. unique id of the message in the conversation for persistence.
+   * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + 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(); + messageId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. unique id of the message in the conversation for persistence.
+   * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTimestamp()); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, messageId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, messageId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.Message)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Message other = + (com.google.cloud.geminidataanalytics.v1.Message) obj; + + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (!getMessageId().equals(other.getMessageId())) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (!getUserMessage().equals(other.getUserMessage())) return false; + break; + case 3: + if (!getSystemMessage().equals(other.getSystemMessage())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + switch (kindCase_) { + case 2: + hash = (37 * hash) + USER_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getUserMessage().hashCode(); + break; + case 3: + hash = (37 * hash) + SYSTEM_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getSystemMessage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Message 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.geminidataanalytics.v1.Message parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Message 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.geminidataanalytics.v1.Message parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Message parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Message 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message from an interaction between the user and the system.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Message} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Message) + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Message_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Message_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Message.class, + com.google.cloud.geminidataanalytics.v1.Message.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Message.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTimestampFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userMessageBuilder_ != null) { + userMessageBuilder_.clear(); + } + if (systemMessageBuilder_ != null) { + systemMessageBuilder_.clear(); + } + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + messageId_ = ""; + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_Message_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Message getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Message build() { + com.google.cloud.geminidataanalytics.v1.Message result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Message buildPartial() { + com.google.cloud.geminidataanalytics.v1.Message result = + new com.google.cloud.geminidataanalytics.v1.Message(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Message result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.messageId_ = messageId_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.Message result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 2 && userMessageBuilder_ != null) { + result.kind_ = userMessageBuilder_.build(); + } + if (kindCase_ == 3 && systemMessageBuilder_ != null) { + result.kind_ = systemMessageBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Message) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Message) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Message other) { + if (other == com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance()) + return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000008; + onChanged(); + } + switch (other.getKindCase()) { + case USER_MESSAGE: + { + mergeUserMessage(other.getUserMessage()); + break; + } + case SYSTEM_MESSAGE: + { + mergeSystemMessage(other.getSystemMessage()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUserMessageFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetSystemMessageFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + case 34: + { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserMessage, + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder, + com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder> + userMessageBuilder_; + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return Whether the userMessage field is set. + */ + @java.lang.Override + public boolean hasUserMessage() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return The userMessage. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessage getUserMessage() { + if (userMessageBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return userMessageBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + public Builder setUserMessage(com.google.cloud.geminidataanalytics.v1.UserMessage value) { + if (userMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + userMessageBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + public Builder setUserMessage( + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder builderForValue) { + if (userMessageBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + userMessageBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + public Builder mergeUserMessage(com.google.cloud.geminidataanalytics.v1.UserMessage value) { + if (userMessageBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.UserMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + userMessageBuilder_.mergeFrom(value); + } else { + userMessageBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + public Builder clearUserMessage() { + if (userMessageBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + userMessageBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + public com.google.cloud.geminidataanalytics.v1.UserMessage.Builder getUserMessageBuilder() { + return internalGetUserMessageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder getUserMessageOrBuilder() { + if ((kindCase_ == 2) && (userMessageBuilder_ != null)) { + return userMessageBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message from the user that is interacting with the system.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserMessage, + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder, + com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder> + internalGetUserMessageFieldBuilder() { + if (userMessageBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + userMessageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.UserMessage, + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder, + com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.UserMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return userMessageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SystemMessage, + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder> + systemMessageBuilder_; + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return Whether the systemMessage field is set. + */ + @java.lang.Override + public boolean hasSystemMessage() { + return kindCase_ == 3; + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return The systemMessage. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessage getSystemMessage() { + if (systemMessageBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return systemMessageBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + public Builder setSystemMessage(com.google.cloud.geminidataanalytics.v1.SystemMessage value) { + if (systemMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + systemMessageBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + public Builder setSystemMessage( + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder builderForValue) { + if (systemMessageBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + systemMessageBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + public Builder mergeSystemMessage(com.google.cloud.geminidataanalytics.v1.SystemMessage value) { + if (systemMessageBuilder_ == null) { + if (kindCase_ == 3 + && kind_ + != com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.SystemMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + systemMessageBuilder_.mergeFrom(value); + } else { + systemMessageBuilder_.setMessage(value); + } + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + public Builder clearSystemMessage() { + if (systemMessageBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + systemMessageBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + public com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder getSystemMessageBuilder() { + return internalGetSystemMessageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder + getSystemMessageOrBuilder() { + if ((kindCase_ == 3) && (systemMessageBuilder_ != null)) { + return systemMessageBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message from the system in response to the user.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SystemMessage, + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder> + internalGetSystemMessageFieldBuilder() { + if (systemMessageBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + systemMessageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SystemMessage, + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.SystemMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged(); + return systemMessageBuilder_; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && timestamp_ != null + && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetTimestampFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * + * + *
+     * Output only. For user messages, this is the time at which the system
+     * received the message. For system messages, this is the time at which the
+     * system generated the message.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private java.lang.Object messageId_ = ""; + + /** + * + * + *
+     * Optional. unique id of the message in the conversation for persistence.
+     * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. unique id of the message in the conversation for persistence.
+     * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. unique id of the message in the conversation for persistence.
+     * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + messageId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. unique id of the message in the conversation for persistence.
+     * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. unique id of the message in the conversation for persistence.
+     * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Message) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Message) + private static final com.google.cloud.geminidataanalytics.v1.Message DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Message(); + } + + public static com.google.cloud.geminidataanalytics.v1.Message getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Message parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Message getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MessageOrBuilder.java new file mode 100644 index 000000000000..a7a68b844d76 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/MessageOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface MessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Message) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return Whether the userMessage field is set. + */ + boolean hasUserMessage(); + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + * + * @return The userMessage. + */ + com.google.cloud.geminidataanalytics.v1.UserMessage getUserMessage(); + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.UserMessage user_message = 2; + */ + com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder getUserMessageOrBuilder(); + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return Whether the systemMessage field is set. + */ + boolean hasSystemMessage(); + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + * + * @return The systemMessage. + */ + com.google.cloud.geminidataanalytics.v1.SystemMessage getSystemMessage(); + + /** + * + * + *
+   * A message from the system in response to the user.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SystemMessage system_message = 3; + */ + com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder getSystemMessageOrBuilder(); + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + * + * + *
+   * Output only. For user messages, this is the time at which the system
+   * received the message. For system messages, this is the time at which the
+   * system generated the message.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
+   * Optional. unique id of the message in the conversation for persistence.
+   * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The messageId. + */ + java.lang.String getMessageId(); + + /** + * + * + *
+   * Optional. unique id of the message in the conversation for persistence.
+   * 
+ * + * string message_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString getMessageIdBytes(); + + com.google.cloud.geminidataanalytics.v1.Message.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentials.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentials.java new file mode 100644 index 000000000000..bf7ae7a5e605 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentials.java @@ -0,0 +1,2591 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/credentials.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Represents OAuth credentials.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials} + */ +@com.google.protobuf.Generated +public final class OAuthCredentials extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials) + OAuthCredentialsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OAuthCredentials"); + } + + // Use OAuthCredentials.newBuilder() to construct. + private OAuthCredentials(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OAuthCredentials() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder.class); + } + + public interface SecretBasedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. An OAuth client ID.
+     * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
+     * Required. An OAuth client ID.
+     * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
+     * Required. An OAuth client secret.
+     * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + java.lang.String getClientSecret(); + + /** + * + * + *
+     * Required. An OAuth client secret.
+     * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + com.google.protobuf.ByteString getClientSecretBytes(); + } + + /** + * + * + *
+   * The name of the secret containing the access token.
+   * Represents secret-based OAuth credentials.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased} + */ + public static final class SecretBased extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) + SecretBasedOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SecretBased"); + } + + // Use SecretBased.newBuilder() to construct. + private SecretBased(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SecretBased() { + clientId_ = ""; + clientSecret_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder.class); + } + + public static final int CLIENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
+     * Required. An OAuth client ID.
+     * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + 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(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. An OAuth client ID.
+     * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_SECRET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+     * Required. An OAuth client secret.
+     * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + @java.lang.Override + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + 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(); + clientSecret_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. An OAuth client secret.
+     * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientSecret_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, clientSecret_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientSecret_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, clientSecret_); + } + size += getUnknownFields().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.geminidataanalytics.v1.OAuthCredentials.SecretBased)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased other = + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) obj; + + if (!getClientId().equals(other.getClientId())) return false; + if (!getClientSecret().equals(other.getClientSecret())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getClientSecret().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased 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.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased 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.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.OAuthCredentials.SecretBased 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The name of the secret containing the access token.
+     * Represents secret-based OAuth credentials.
+     * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clientId_ = ""; + clientSecret_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_SecretBased_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased build() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased buildPartial() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased result = + new com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientSecret_ = clientSecret_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased other) { + if (other + == com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance()) return this; + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClientSecret().isEmpty()) { + clientSecret_ = other.clientSecret_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + clientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object clientId_ = ""; + + /** + * + * + *
+       * Required. An OAuth client ID.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. An OAuth client ID.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. An OAuth client ID.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. An OAuth client ID.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. An OAuth client ID.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+       * Required. An OAuth client secret.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. An OAuth client secret.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. An OAuth client secret.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientSecret_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. An OAuth client secret.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientSecret() { + clientSecret_ = getDefaultInstance().getClientSecret(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. An OAuth client secret.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientSecret_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) + private static final com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased(); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecretBased parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.OAuthCredentials.SecretBased + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TokenBasedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the secret containing the access token.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessToken. + */ + java.lang.String getAccessToken(); + + /** + * + * + *
+     * Required. The name of the secret containing the access token.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessToken. + */ + com.google.protobuf.ByteString getAccessTokenBytes(); + } + + /** + * + * + *
+   * Read more about Looker access tokens here:
+   * https://developers.looker.com/api/advanced-usage/looker-api-oauth
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased} + */ + public static final class TokenBased extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) + TokenBasedOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TokenBased"); + } + + // Use TokenBased.newBuilder() to construct. + private TokenBased(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TokenBased() { + accessToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder.class); + } + + public static final int ACCESS_TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object accessToken_ = ""; + + /** + * + * + *
+     * Required. The name of the secret containing the access token.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessToken. + */ + @java.lang.Override + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + 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(); + accessToken_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of the secret containing the access token.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(accessToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, accessToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accessToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, accessToken_); + } + size += getUnknownFields().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.geminidataanalytics.v1.OAuthCredentials.TokenBased)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased other = + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) obj; + + if (!getAccessToken().equals(other.getAccessToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ACCESS_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAccessToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased 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.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased 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.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.OAuthCredentials.TokenBased 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Read more about Looker access tokens here:
+     * https://developers.looker.com/api/advanced-usage/looker-api-oauth
+     * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + accessToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_TokenBased_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased build() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased buildPartial() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased result = + new com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.accessToken_ = accessToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased other) { + if (other + == com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance()) return this; + if (!other.getAccessToken().isEmpty()) { + accessToken_ = other.accessToken_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + accessToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object accessToken_ = ""; + + /** + * + * + *
+       * Required. The name of the secret containing the access token.
+       * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessToken. + */ + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of the secret containing the access token.
+       * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessToken. + */ + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of the secret containing the access token.
+       * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accessToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the secret containing the access token.
+       * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccessToken() { + accessToken_ = getDefaultInstance().getAccessToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the secret containing the access token.
+       * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accessToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) + private static final com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased(); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TokenBased parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.OAuthCredentials.TokenBased + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SECRET(2), + TOKEN(3), + 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 2: + return SECRET; + case 3: + return TOKEN; + 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 SECRET_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return Whether the secret field is set. + */ + @java.lang.Override + public boolean hasSecret() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return The secret. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased getSecret() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder + getSecretOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + + public static final int TOKEN_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return Whether the token field is set. + */ + @java.lang.Override + public boolean hasToken() { + return kindCase_ == 3; + } + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return The token. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased getToken() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.getDefaultInstance(); + } + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder + getTokenOrBuilder() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.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_ == 2) { + output.writeMessage( + 2, (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_); + } + if (kindCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.OAuthCredentials)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.OAuthCredentials other = + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (!getSecret().equals(other.getSecret())) return false; + break; + case 3: + if (!getToken().equals(other.getToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 2: + hash = (37 * hash) + SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecret().hashCode(); + break; + case 3: + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials 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.geminidataanalytics.v1.OAuthCredentials parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials 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.geminidataanalytics.v1.OAuthCredentials parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.OAuthCredentials 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents OAuth credentials.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OAuthCredentials} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.OAuthCredentials) + com.google.cloud.geminidataanalytics.v1.OAuthCredentialsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.class, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.OAuthCredentials.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (secretBuilder_ != null) { + secretBuilder_.clear(); + } + if (tokenBuilder_ != null) { + tokenBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.CredentialsProto + .internal_static_google_cloud_geminidataanalytics_v1_OAuthCredentials_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials build() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials buildPartial() { + com.google.cloud.geminidataanalytics.v1.OAuthCredentials result = + new com.google.cloud.geminidataanalytics.v1.OAuthCredentials(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.OAuthCredentials result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 2 && secretBuilder_ != null) { + result.kind_ = secretBuilder_.build(); + } + if (kindCase_ == 3 && tokenBuilder_ != null) { + result.kind_ = tokenBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.OAuthCredentials) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.OAuthCredentials) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.OAuthCredentials other) { + if (other == com.google.cloud.geminidataanalytics.v1.OAuthCredentials.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case SECRET: + { + mergeSecret(other.getSecret()); + break; + } + case TOKEN: + { + mergeToken(other.getToken()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(internalGetSecretFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetTokenFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder> + secretBuilder_; + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return Whether the secret field is set. + */ + @java.lang.Override + public boolean hasSecret() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return The secret. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased getSecret() { + if (secretBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return secretBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + public Builder setSecret( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased value) { + if (secretBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + secretBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + public Builder setSecret( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder + builderForValue) { + if (secretBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + secretBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + public Builder mergeSecret( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased value) { + if (secretBuilder_ == null) { + if (kindCase_ == 2 + && kind_ + != com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.newBuilder( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + secretBuilder_.mergeFrom(value); + } else { + secretBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + public Builder clearSecret() { + if (secretBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + secretBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder + getSecretBuilder() { + return internalGetSecretFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder + getSecretOrBuilder() { + if ((kindCase_ == 2) && (secretBuilder_ != null)) { + return secretBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Secret-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder> + internalGetSecretFieldBuilder() { + if (secretBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased + .getDefaultInstance(); + } + secretBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return secretBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder> + tokenBuilder_; + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return Whether the token field is set. + */ + @java.lang.Override + public boolean hasToken() { + return kindCase_ == 3; + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return The token. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased getToken() { + if (tokenBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return tokenBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + public Builder setToken( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased value) { + if (tokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + tokenBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + public Builder setToken( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder + builderForValue) { + if (tokenBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + tokenBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + public Builder mergeToken( + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased value) { + if (tokenBuilder_ == null) { + if (kindCase_ == 3 + && kind_ + != com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.newBuilder( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + tokenBuilder_.mergeFrom(value); + } else { + tokenBuilder_.setMessage(value); + } + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + public Builder clearToken() { + if (tokenBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + tokenBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder + getTokenBuilder() { + return internalGetTokenFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder + getTokenOrBuilder() { + if ((kindCase_ == 3) && (tokenBuilder_ != null)) { + return tokenBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_; + } + return com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Token-based OAuth credentials.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder> + internalGetTokenFieldBuilder() { + if (tokenBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased + .getDefaultInstance(); + } + tokenBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased.Builder, + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged(); + return tokenBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.OAuthCredentials) + private static final com.google.cloud.geminidataanalytics.v1.OAuthCredentials DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.OAuthCredentials(); + } + + public static com.google.cloud.geminidataanalytics.v1.OAuthCredentials getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthCredentials parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.OAuthCredentials getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentialsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentialsOrBuilder.java new file mode 100644 index 000000000000..a8207b862704 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OAuthCredentialsOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/credentials.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface OAuthCredentialsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.OAuthCredentials) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return Whether the secret field is set. + */ + boolean hasSecret(); + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + * + * @return The secret. + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased getSecret(); + + /** + * + * + *
+   * Secret-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBased secret = 2; + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.SecretBasedOrBuilder + getSecretOrBuilder(); + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return Whether the token field is set. + */ + boolean hasToken(); + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + * + * @return The token. + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased getToken(); + + /** + * + * + *
+   * Token-based OAuth credentials.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBased token = 3; + */ + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.TokenBasedOrBuilder getTokenOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.OAuthCredentials.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadata.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadata.java new file mode 100644 index 000000000000..9473fe05cf60 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadata.java @@ -0,0 +1,1870 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OperationMetadata.class, + com.google.cloud.geminidataanalytics.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().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.geminidataanalytics.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.OperationMetadata other = + (com.google.cloud.geminidataanalytics.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata 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.geminidataanalytics.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata 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.geminidataanalytics.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.OperationMetadata 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.OperationMetadata) + com.google.cloud.geminidataanalytics.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.OperationMetadata.class, + com.google.cloud.geminidataanalytics.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OperationMetadata build() { + com.google.cloud.geminidataanalytics.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.OperationMetadata buildPartial() { + com.google.cloud.geminidataanalytics.v1.OperationMetadata result = + new com.google.cloud.geminidataanalytics.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.OperationMetadata other) { + if (other == com.google.cloud.geminidataanalytics.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.OperationMetadata) + private static final com.google.cloud.geminidataanalytics.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.OperationMetadata(); + } + + public static com.google.cloud.geminidataanalytics.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadataOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..73b066495b1e --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfo.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfo.java new file mode 100644 index 000000000000..74af3763c1c3 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfo.java @@ -0,0 +1,797 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing a private Looker instance info required if the Looker
+ * instance is behind a private network.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo} + */ +@com.google.protobuf.Generated +public final class PrivateLookerInstanceInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) + PrivateLookerInstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrivateLookerInstanceInfo"); + } + + // Use PrivateLookerInstanceInfo.newBuilder() to construct. + private PrivateLookerInstanceInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrivateLookerInstanceInfo() { + lookerInstanceId_ = ""; + serviceDirectoryName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.class, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder.class); + } + + public static final int LOOKER_INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object lookerInstanceId_ = ""; + + /** + * + * + *
+   * The Looker instance id.
+   * 
+ * + * string looker_instance_id = 1; + * + * @return The lookerInstanceId. + */ + @java.lang.Override + public java.lang.String getLookerInstanceId() { + java.lang.Object ref = lookerInstanceId_; + 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(); + lookerInstanceId_ = s; + return s; + } + } + + /** + * + * + *
+   * The Looker instance id.
+   * 
+ * + * string looker_instance_id = 1; + * + * @return The bytes for lookerInstanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLookerInstanceIdBytes() { + java.lang.Object ref = lookerInstanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookerInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_DIRECTORY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceDirectoryName_ = ""; + + /** + * + * + *
+   * The service directory name of the Looker instance.
+   * 
+ * + * string service_directory_name = 2; + * + * @return The serviceDirectoryName. + */ + @java.lang.Override + public java.lang.String getServiceDirectoryName() { + java.lang.Object ref = serviceDirectoryName_; + 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(); + serviceDirectoryName_ = s; + return s; + } + } + + /** + * + * + *
+   * The service directory name of the Looker instance.
+   * 
+ * + * string service_directory_name = 2; + * + * @return The bytes for serviceDirectoryName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceDirectoryNameBytes() { + java.lang.Object ref = serviceDirectoryName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceDirectoryName_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookerInstanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, lookerInstanceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceDirectoryName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, serviceDirectoryName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookerInstanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, lookerInstanceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceDirectoryName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, serviceDirectoryName_); + } + size += getUnknownFields().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.geminidataanalytics.v1.PrivateLookerInstanceInfo)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo other = + (com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) obj; + + if (!getLookerInstanceId().equals(other.getLookerInstanceId())) return false; + if (!getServiceDirectoryName().equals(other.getServiceDirectoryName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LOOKER_INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getLookerInstanceId().hashCode(); + hash = (37 * hash) + SERVICE_DIRECTORY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceDirectoryName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo 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.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo 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.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.PrivateLookerInstanceInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing a private Looker instance info required if the Looker
+   * instance is behind a private network.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.class, + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lookerInstanceId_ = ""; + serviceDirectoryName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_PrivateLookerInstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo build() { + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo buildPartial() { + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo result = + new com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lookerInstanceId_ = lookerInstanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceDirectoryName_ = serviceDirectoryName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo other) { + if (other + == com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo.getDefaultInstance()) + return this; + if (!other.getLookerInstanceId().isEmpty()) { + lookerInstanceId_ = other.lookerInstanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceDirectoryName().isEmpty()) { + serviceDirectoryName_ = other.serviceDirectoryName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + lookerInstanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + serviceDirectoryName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object lookerInstanceId_ = ""; + + /** + * + * + *
+     * The Looker instance id.
+     * 
+ * + * string looker_instance_id = 1; + * + * @return The lookerInstanceId. + */ + public java.lang.String getLookerInstanceId() { + java.lang.Object ref = lookerInstanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lookerInstanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The Looker instance id.
+     * 
+ * + * string looker_instance_id = 1; + * + * @return The bytes for lookerInstanceId. + */ + public com.google.protobuf.ByteString getLookerInstanceIdBytes() { + java.lang.Object ref = lookerInstanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookerInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The Looker instance id.
+     * 
+ * + * string looker_instance_id = 1; + * + * @param value The lookerInstanceId to set. + * @return This builder for chaining. + */ + public Builder setLookerInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lookerInstanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The Looker instance id.
+     * 
+ * + * string looker_instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearLookerInstanceId() { + lookerInstanceId_ = getDefaultInstance().getLookerInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The Looker instance id.
+     * 
+ * + * string looker_instance_id = 1; + * + * @param value The bytes for lookerInstanceId to set. + * @return This builder for chaining. + */ + public Builder setLookerInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lookerInstanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object serviceDirectoryName_ = ""; + + /** + * + * + *
+     * The service directory name of the Looker instance.
+     * 
+ * + * string service_directory_name = 2; + * + * @return The serviceDirectoryName. + */ + public java.lang.String getServiceDirectoryName() { + java.lang.Object ref = serviceDirectoryName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceDirectoryName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The service directory name of the Looker instance.
+     * 
+ * + * string service_directory_name = 2; + * + * @return The bytes for serviceDirectoryName. + */ + public com.google.protobuf.ByteString getServiceDirectoryNameBytes() { + java.lang.Object ref = serviceDirectoryName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceDirectoryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The service directory name of the Looker instance.
+     * 
+ * + * string service_directory_name = 2; + * + * @param value The serviceDirectoryName to set. + * @return This builder for chaining. + */ + public Builder setServiceDirectoryName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceDirectoryName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The service directory name of the Looker instance.
+     * 
+ * + * string service_directory_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearServiceDirectoryName() { + serviceDirectoryName_ = getDefaultInstance().getServiceDirectoryName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The service directory name of the Looker instance.
+     * 
+ * + * string service_directory_name = 2; + * + * @param value The bytes for serviceDirectoryName to set. + * @return This builder for chaining. + */ + public Builder setServiceDirectoryNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceDirectoryName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) + private static final com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo(); + } + + public static com.google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateLookerInstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.PrivateLookerInstanceInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfoOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfoOrBuilder.java new file mode 100644 index 000000000000..82a84a6f8aaa --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/PrivateLookerInstanceInfoOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface PrivateLookerInstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.PrivateLookerInstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Looker instance id.
+   * 
+ * + * string looker_instance_id = 1; + * + * @return The lookerInstanceId. + */ + java.lang.String getLookerInstanceId(); + + /** + * + * + *
+   * The Looker instance id.
+   * 
+ * + * string looker_instance_id = 1; + * + * @return The bytes for lookerInstanceId. + */ + com.google.protobuf.ByteString getLookerInstanceIdBytes(); + + /** + * + * + *
+   * The service directory name of the Looker instance.
+   * 
+ * + * string service_directory_name = 2; + * + * @return The serviceDirectoryName. + */ + java.lang.String getServiceDirectoryName(); + + /** + * + * + *
+   * The service directory name of the Looker instance.
+   * 
+ * + * string service_directory_name = 2; + * + * @return The bytes for serviceDirectoryName. + */ + com.google.protobuf.ByteString getServiceDirectoryNameBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameter.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameter.java new file mode 100644 index 000000000000..4f66db910b7a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameter.java @@ -0,0 +1,1012 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query parameter message represents a parameter that can be used to
+ * parameterize a SQL query.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.QueryParameter} + */ +@com.google.protobuf.Generated +public final class QueryParameter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.QueryParameter) + QueryParameterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryParameter"); + } + + // Use QueryParameter.newBuilder() to construct. + private QueryParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryParameter() { + name_ = ""; + description_ = ""; + dataType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.QueryParameter.class, + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the parameter reference in the SQL query.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter reference in the SQL query.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the parameter that can be used by LLM to
+   * extract the parameter value from the user question.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The description of the parameter that can be used by LLM to
+   * extract the parameter value from the user question.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataType_ = ""; + + /** + * + * + *
+   * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+   * etc. For valid values, see the [BigQuery
+   * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+   * This will be used to populate
+   * google.cloud.bigquery.v2.QueryParameterType.type.
+   * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataType. + */ + @java.lang.Override + public java.lang.String getDataType() { + java.lang.Object ref = dataType_; + 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(); + dataType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+   * etc. For valid values, see the [BigQuery
+   * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+   * This will be used to populate
+   * google.cloud.bigquery.v2.QueryParameterType.type.
+   * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTypeBytes() { + java.lang.Object ref = dataType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataType_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, dataType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataType_); + } + size += getUnknownFields().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.geminidataanalytics.v1.QueryParameter)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.QueryParameter other = + (com.google.cloud.geminidataanalytics.v1.QueryParameter) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDataType().equals(other.getDataType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDataType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter 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.geminidataanalytics.v1.QueryParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter 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.geminidataanalytics.v1.QueryParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.QueryParameter 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query parameter message represents a parameter that can be used to
+   * parameterize a SQL query.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.QueryParameter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.QueryParameter) + com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.QueryParameter.class, + com.google.cloud.geminidataanalytics.v1.QueryParameter.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.QueryParameter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + dataType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameter_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameter getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.QueryParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameter build() { + com.google.cloud.geminidataanalytics.v1.QueryParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameter buildPartial() { + com.google.cloud.geminidataanalytics.v1.QueryParameter result = + new com.google.cloud.geminidataanalytics.v1.QueryParameter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.QueryParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataType_ = dataType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.QueryParameter) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.QueryParameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.QueryParameter other) { + if (other == com.google.cloud.geminidataanalytics.v1.QueryParameter.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDataType().isEmpty()) { + dataType_ = other.dataType_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + dataType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the parameter reference in the SQL query.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter reference in the SQL query.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter reference in the SQL query.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parameter reference in the SQL query.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parameter reference in the SQL query.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the parameter that can be used by LLM to
+     * extract the parameter value from the user question.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the parameter that can be used by LLM to
+     * extract the parameter value from the user question.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the parameter that can be used by LLM to
+     * extract the parameter value from the user question.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the parameter that can be used by LLM to
+     * extract the parameter value from the user question.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the parameter that can be used by LLM to
+     * extract the parameter value from the user question.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object dataType_ = ""; + + /** + * + * + *
+     * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+     * etc. For valid values, see the [BigQuery
+     * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+     * This will be used to populate
+     * google.cloud.bigquery.v2.QueryParameterType.type.
+     * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataType. + */ + public java.lang.String getDataType() { + java.lang.Object ref = dataType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+     * etc. For valid values, see the [BigQuery
+     * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+     * This will be used to populate
+     * google.cloud.bigquery.v2.QueryParameterType.type.
+     * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataType. + */ + public com.google.protobuf.ByteString getDataTypeBytes() { + java.lang.Object ref = dataType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+     * etc. For valid values, see the [BigQuery
+     * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+     * This will be used to populate
+     * google.cloud.bigquery.v2.QueryParameterType.type.
+     * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataType to set. + * @return This builder for chaining. + */ + public Builder setDataType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+     * etc. For valid values, see the [BigQuery
+     * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+     * This will be used to populate
+     * google.cloud.bigquery.v2.QueryParameterType.type.
+     * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataType() { + dataType_ = getDefaultInstance().getDataType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+     * etc. For valid values, see the [BigQuery
+     * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+     * This will be used to populate
+     * google.cloud.bigquery.v2.QueryParameterType.type.
+     * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataType to set. + * @return This builder for chaining. + */ + public Builder setDataTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.QueryParameter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.QueryParameter) + private static final com.google.cloud.geminidataanalytics.v1.QueryParameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.QueryParameter(); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.QueryParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterOrBuilder.java new file mode 100644 index 000000000000..b7e2ae99c0b6 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface QueryParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.QueryParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parameter reference in the SQL query.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the parameter reference in the SQL query.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the parameter that can be used by LLM to
+   * extract the parameter value from the user question.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the parameter that can be used by LLM to
+   * extract the parameter value from the user question.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+   * etc. For valid values, see the [BigQuery
+   * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+   * This will be used to populate
+   * google.cloud.bigquery.v2.QueryParameterType.type.
+   * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataType. + */ + java.lang.String getDataType(); + + /** + * + * + *
+   * Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE",
+   * etc. For valid values, see the [BigQuery
+   * documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+   * This will be used to populate
+   * google.cloud.bigquery.v2.QueryParameterType.type.
+   * 
+ * + * string data_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataType. + */ + com.google.protobuf.ByteString getDataTypeBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValues.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValues.java new file mode 100644 index 000000000000..3514f9db232d --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValues.java @@ -0,0 +1,794 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query parameter values message represents the values for the query
+ * parameters that were extracted from the user question by LLM, based on the
+ * example query.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.QueryParameterValues} + */ +@com.google.protobuf.Generated +public final class QueryParameterValues extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.QueryParameterValues) + QueryParameterValuesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryParameterValues"); + } + + // Use QueryParameterValues.newBuilder() to construct. + private QueryParameterValues(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryParameterValues() { + name_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.class, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+   * Required. The value of the parameter.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The value of the parameter.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + size += getUnknownFields().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.geminidataanalytics.v1.QueryParameterValues)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.QueryParameterValues other = + (com.google.cloud.geminidataanalytics.v1.QueryParameterValues) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues 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.geminidataanalytics.v1.QueryParameterValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues 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.geminidataanalytics.v1.QueryParameterValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.QueryParameterValues 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query parameter values message represents the values for the query
+   * parameters that were extracted from the user question by LLM, based on the
+   * example query.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.QueryParameterValues} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.QueryParameterValues) + com.google.cloud.geminidataanalytics.v1.QueryParameterValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.class, + com.google.cloud.geminidataanalytics.v1.QueryParameterValues.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.QueryParameterValues.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_QueryParameterValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.QueryParameterValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues build() { + com.google.cloud.geminidataanalytics.v1.QueryParameterValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.QueryParameterValues buildPartial() { + com.google.cloud.geminidataanalytics.v1.QueryParameterValues result = + new com.google.cloud.geminidataanalytics.v1.QueryParameterValues(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.QueryParameterValues result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.QueryParameterValues) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.QueryParameterValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.QueryParameterValues other) { + if (other + == com.google.cloud.geminidataanalytics.v1.QueryParameterValues.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+     * Required. The value of the parameter.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The value of the parameter.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The value of the parameter.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The value of the parameter.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The value of the parameter.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.QueryParameterValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.QueryParameterValues) + private static final com.google.cloud.geminidataanalytics.v1.QueryParameterValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.QueryParameterValues(); + } + + public static com.google.cloud.geminidataanalytics.v1.QueryParameterValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryParameterValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.QueryParameterValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValuesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValuesOrBuilder.java new file mode 100644 index 000000000000..7436bbbd9dda --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/QueryParameterValuesOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface QueryParameterValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.QueryParameterValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The value of the parameter.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+   * Required. The value of the parameter.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Schema.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Schema.java new file mode 100644 index 000000000000..733ce152e577 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/Schema.java @@ -0,0 +1,2590 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The schema of a Datasource or QueryResult instance.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Schema} + */ +@com.google.protobuf.Generated +public final class Schema extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.Schema) + SchemaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Schema"); + } + + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Schema() { + fields_ = java.util.Collections.emptyList(); + description_ = ""; + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + filters_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Schema.class, + com.google.cloud.geminidataanalytics.v1.Schema.Builder.class); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List fields_; + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Field getFields(int index) { + return fields_.get(index); + } + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A textual description of the table's content and purpose.
+   * For example: "Contains information about customer orders in our e-commerce
+   * store." Currently only used for BigQuery data sources.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A textual description of the table's content and purpose.
+   * For example: "Contains information about customer orders in our e-commerce
+   * store." Currently only used for BigQuery data sources.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYNONYMS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + return synonyms_; + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + public int getSynonymsCount() { + return synonyms_.size(); + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); + } + + public static final int TAGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. Table display_name (same as label in
+   * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+   * required, currently only Looker has this field.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Table display_name (same as label in
+   * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+   * required, currently only Looker has this field.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 FILTERS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List filters_; + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFiltersList() { + return filters_; + } + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFiltersOrBuilderList() { + return filters_; + } + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFiltersCount() { + return filters_.size(); + } + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilter getFilters(int index) { + return filters_.get(index); + } + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder getFiltersOrBuilder( + int index) { + return filters_.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 < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + for (int i = 0; i < synonyms_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, synonyms_.getRaw(i)); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, tags_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, displayName_); + } + for (int i = 0; i < filters_.size(); i++) { + output.writeMessage(6, filters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + { + int dataSize = 0; + for (int i = 0; i < synonyms_.size(); i++) { + dataSize += computeStringSizeNoTag(synonyms_.getRaw(i)); + } + size += dataSize; + size += 1 * getSynonymsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, displayName_); + } + for (int i = 0; i < filters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, filters_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.Schema)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.Schema other = + (com.google.cloud.geminidataanalytics.v1.Schema) obj; + + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getSynonymsList().equals(other.getSynonymsList())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getFiltersList().equals(other.getFiltersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getSynonymsCount() > 0) { + hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; + hash = (53 * hash) + getSynonymsList().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(); + if (getFiltersCount() > 0) { + hash = (37 * hash) + FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getFiltersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema 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.geminidataanalytics.v1.Schema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema 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.geminidataanalytics.v1.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.Schema 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The schema of a Datasource or QueryResult instance.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.Schema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.Schema) + com.google.cloud.geminidataanalytics.v1.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.Schema.class, + com.google.cloud.geminidataanalytics.v1.Schema.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.Schema.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + } else { + fields_ = null; + fieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + description_ = ""; + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + } else { + filters_ = null; + filtersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_Schema_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema build() { + com.google.cloud.geminidataanalytics.v1.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Schema buildPartial() { + com.google.cloud.geminidataanalytics.v1.Schema result = + new com.google.cloud.geminidataanalytics.v1.Schema(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.geminidataanalytics.v1.Schema result) { + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + if (filtersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + filters_ = java.util.Collections.unmodifiableList(filters_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.filters_ = filters_; + } else { + result.filters_ = filtersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.Schema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + synonyms_.makeImmutable(); + result.synonyms_ = synonyms_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.Schema) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.Schema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.Schema other) { + if (other == com.google.cloud.geminidataanalytics.v1.Schema.getDefaultInstance()) return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.synonyms_.isEmpty()) { + if (synonyms_.isEmpty()) { + synonyms_ = other.synonyms_; + bitField0_ |= 0x00000004; + } else { + ensureSynonymsIsMutable(); + synonyms_.addAll(other.synonyms_); + } + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000008; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (filtersBuilder_ == null) { + if (!other.filters_.isEmpty()) { + if (filters_.isEmpty()) { + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureFiltersIsMutable(); + filters_.addAll(other.filters_); + } + onChanged(); + } + } else { + if (!other.filters_.isEmpty()) { + if (filtersBuilder_.isEmpty()) { + filtersBuilder_.dispose(); + filtersBuilder_ = null; + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000020); + filtersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFiltersFieldBuilder() + : null; + } else { + filtersBuilder_.addAllMessages(other.filters_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.Field m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Field.parser(), extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.geminidataanalytics.v1.DataFilter m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.DataFilter.parser(), + extensionRegistry); + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(m); + } else { + filtersBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder> + fieldsBuilder_; + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFields(int index, com.google.cloud.geminidataanalytics.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFields( + int index, com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFields(com.google.cloud.geminidataanalytics.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFields(int index, com.google.cloud.geminidataanalytics.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFields( + com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFields( + int index, com.google.cloud.geminidataanalytics.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder getFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder addFieldsBuilder() { + return internalGetFieldsFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Field.Builder addFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder() + .addBuilder(index, com.google.cloud.geminidataanalytics.v1.Field.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The fields in the schema.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFieldsBuilderList() { + return internalGetFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder> + internalGetFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Field, + com.google.cloud.geminidataanalytics.v1.Field.Builder, + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder>( + fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A textual description of the table's content and purpose.
+     * For example: "Contains information about customer orders in our e-commerce
+     * store." Currently only used for BigQuery data sources.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A textual description of the table's content and purpose.
+     * For example: "Contains information about customer orders in our e-commerce
+     * store." Currently only used for BigQuery data sources.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A textual description of the table's content and purpose.
+     * For example: "Contains information about customer orders in our e-commerce
+     * store." Currently only used for BigQuery data sources.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A textual description of the table's content and purpose.
+     * For example: "Contains information about customer orders in our e-commerce
+     * store." Currently only used for BigQuery data sources.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A textual description of the table's content and purpose.
+     * For example: "Contains information about customer orders in our e-commerce
+     * store." Currently only used for BigQuery data sources.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSynonymsIsMutable() { + if (!synonyms_.isModifiable()) { + synonyms_ = new com.google.protobuf.LazyStringArrayList(synonyms_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + synonyms_.makeImmutable(); + return synonyms_; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + public int getSynonymsCount() { + return synonyms_.size(); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The synonyms to set. + * @return This builder for chaining. + */ + public Builder setSynonyms(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSynonymsIsMutable(); + synonyms_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The synonyms to add. + * @return This builder for chaining. + */ + public Builder addSynonyms(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSynonymsIsMutable(); + synonyms_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The synonyms to add. + * @return This builder for chaining. + */ + public Builder addAllSynonyms(java.lang.Iterable values) { + ensureSynonymsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, synonyms_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSynonyms() { + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of alternative names or synonyms that can be used to refer
+     * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+     * used for BigQuery data sources.
+     * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the synonyms to add. + * @return This builder for chaining. + */ + public Builder addSynonymsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSynonymsIsMutable(); + synonyms_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of tags or keywords associated with the table, used for
+     * categorization. For example: ["transaction", "revenue", "customer_data"].
+     * Currently only used for BigQuery data sources.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. Table display_name (same as label in
+     * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+     * required, currently only Looker has this field.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Table display_name (same as label in
+     * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+     * required, currently only Looker has this field.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Table display_name (same as label in
+     * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+     * required, currently only Looker has this field.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Table display_name (same as label in
+     * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+     * required, currently only Looker has this field.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Table display_name (same as label in
+     * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+     * required, currently only Looker has this field.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List filters_ = + java.util.Collections.emptyList(); + + private void ensureFiltersIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + filters_ = + new java.util.ArrayList(filters_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataFilter, + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder, + com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder> + filtersBuilder_; + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFiltersList() { + if (filtersBuilder_ == null) { + return java.util.Collections.unmodifiableList(filters_); + } else { + return filtersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFiltersCount() { + if (filtersBuilder_ == null) { + return filters_.size(); + } else { + return filtersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataFilter getFilters(int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); + } else { + return filtersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilters(int index, com.google.cloud.geminidataanalytics.v1.DataFilter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.set(index, value); + onChanged(); + } else { + filtersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilters( + int index, com.google.cloud.geminidataanalytics.v1.DataFilter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.set(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters(com.google.cloud.geminidataanalytics.v1.DataFilter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(value); + onChanged(); + } else { + filtersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters(int index, com.google.cloud.geminidataanalytics.v1.DataFilter value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(index, value); + onChanged(); + } else { + filtersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters( + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFilters( + int index, com.google.cloud.geminidataanalytics.v1.DataFilter.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFilters( + java.lang.Iterable values) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filters_); + onChanged(); + } else { + filtersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFilters() { + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + filtersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFilters(int index) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.remove(index); + onChanged(); + } else { + filtersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataFilter.Builder getFiltersBuilder(int index) { + return internalGetFiltersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder getFiltersOrBuilder( + int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); + } else { + return filtersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFiltersOrBuilderList() { + if (filtersBuilder_ != null) { + return filtersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filters_); + } + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataFilter.Builder addFiltersBuilder() { + return internalGetFiltersFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.DataFilter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataFilter.Builder addFiltersBuilder(int index) { + return internalGetFiltersFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.DataFilter.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The filters on the datasource's underlying data. Currently only
+     * used for Looker data sources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFiltersBuilderList() { + return internalGetFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataFilter, + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder, + com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder> + internalGetFiltersFieldBuilder() { + if (filtersBuilder_ == null) { + filtersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataFilter, + com.google.cloud.geminidataanalytics.v1.DataFilter.Builder, + com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder>( + filters_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + filters_ = null; + } + return filtersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.Schema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.Schema) + private static final com.google.cloud.geminidataanalytics.v1.Schema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.Schema(); + } + + public static com.google.cloud.geminidataanalytics.v1.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessage.java new file mode 100644 index 000000000000..3cd8b915a439 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessage.java @@ -0,0 +1,1102 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message produced during schema resolution.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaMessage} + */ +@com.google.protobuf.Generated +public final class SchemaMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.SchemaMessage) + SchemaMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaMessage"); + } + + // Use SchemaMessage.newBuilder() to construct. + private SchemaMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaMessage.class, + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QUERY(1), + RESULT(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 QUERY; + case 2: + return RESULT; + 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 QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQuery getQuery() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder getQueryOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + + public static final int RESULT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResult getResult() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder getResultOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaResult.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.geminidataanalytics.v1.SchemaQuery) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_); + } + getUnknownFields().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.geminidataanalytics.v1.SchemaQuery) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.SchemaMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.SchemaMessage other = + (com.google.cloud.geminidataanalytics.v1.SchemaMessage) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 2: + if (!getResult().equals(other.getResult())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage 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.geminidataanalytics.v1.SchemaMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage 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.geminidataanalytics.v1.SchemaMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.SchemaMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.SchemaMessage) + com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaMessage.class, + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.SchemaMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + if (resultBuilder_ != null) { + resultBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessage build() { + com.google.cloud.geminidataanalytics.v1.SchemaMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.SchemaMessage result = + new com.google.cloud.geminidataanalytics.v1.SchemaMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.SchemaMessage result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.SchemaMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && queryBuilder_ != null) { + result.kind_ = queryBuilder_.build(); + } + if (kindCase_ == 2 && resultBuilder_ != null) { + result.kind_ = resultBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.SchemaMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.SchemaMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.SchemaMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case RESULT: + { + mergeResult(other.getResult()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetResultFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaQuery, + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder> + queryBuilder_; + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQuery getQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return queryBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + public Builder setQuery(com.google.cloud.geminidataanalytics.v1.SchemaQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + public Builder setQuery( + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + public Builder mergeQuery(com.google.cloud.geminidataanalytics.v1.SchemaQuery value) { + if (queryBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.SchemaQuery.newBuilder( + (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + queryBuilder_.mergeFrom(value); + } else { + queryBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + queryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + public com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder getQueryBuilder() { + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder getQueryOrBuilder() { + if ((kindCase_ == 1) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaQuery, + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaQuery, + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.SchemaQuery) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return queryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaResult, + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder> + resultBuilder_; + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResult getResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return resultBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + public Builder setResult(com.google.cloud.geminidataanalytics.v1.SchemaResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + public Builder setResult( + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder builderForValue) { + if (resultBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + public Builder mergeResult(com.google.cloud.geminidataanalytics.v1.SchemaResult value) { + if (resultBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.SchemaResult.newBuilder( + (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + resultBuilder_.mergeFrom(value); + } else { + resultBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + resultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + public com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder getResultBuilder() { + return internalGetResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder getResultOrBuilder() { + if ((kindCase_ == 2) && (resultBuilder_ != null)) { + return resultBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The result of a schema resolution query.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaResult, + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder> + internalGetResultFieldBuilder() { + if (resultBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaResult, + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.SchemaResult) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return resultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.SchemaMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.SchemaMessage) + private static final com.google.cloud.geminidataanalytics.v1.SchemaMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.SchemaMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.SchemaMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessageOrBuilder.java new file mode 100644 index 000000000000..6853f75031b3 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaMessageOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface SchemaMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.SchemaMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + * + * @return The query. + */ + com.google.cloud.geminidataanalytics.v1.SchemaQuery getQuery(); + + /** + * + * + *
+   * A schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaQuery query = 1; + */ + com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + * + * @return The result. + */ + com.google.cloud.geminidataanalytics.v1.SchemaResult getResult(); + + /** + * + * + *
+   * The result of a schema resolution query.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaResult result = 2; + */ + com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder getResultOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.SchemaMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaOrBuilder.java new file mode 100644 index 000000000000..1ad127756755 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaOrBuilder.java @@ -0,0 +1,349 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface SchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFieldsList(); + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Field getFields(int index); + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFieldsCount(); + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFieldsOrBuilderList(); + + /** + * + * + *
+   * Optional. The fields in the schema.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Field fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.FieldOrBuilder getFieldsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A textual description of the table's content and purpose.
+   * For example: "Contains information about customer orders in our e-commerce
+   * store." Currently only used for BigQuery data sources.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A textual description of the table's content and purpose.
+   * For example: "Contains information about customer orders in our e-commerce
+   * store." Currently only used for BigQuery data sources.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the synonyms. + */ + java.util.List getSynonymsList(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of synonyms. + */ + int getSynonymsCount(); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + java.lang.String getSynonyms(int index); + + /** + * + * + *
+   * Optional. A list of alternative names or synonyms that can be used to refer
+   * to the table. For example: ["sales", "orders", "purchases"]. Currently only
+   * used for BigQuery data sources.
+   * 
+ * + * repeated string synonyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. + */ + com.google.protobuf.ByteString getSynonymsBytes(int index); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + + /** + * + * + *
+   * Optional. A list of tags or keywords associated with the table, used for
+   * categorization. For example: ["transaction", "revenue", "customer_data"].
+   * Currently only used for BigQuery data sources.
+   * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + + /** + * + * + *
+   * Optional. Table display_name (same as label in
+   * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+   * required, currently only Looker has this field.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. Table display_name (same as label in
+   * cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not
+   * required, currently only Looker has this field.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFiltersList(); + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataFilter getFilters(int index); + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFiltersCount(); + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFiltersOrBuilderList(); + + /** + * + * + *
+   * Optional. The filters on the datasource's underlying data. Currently only
+   * used for Looker data sources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.DataFilter filters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataFilterOrBuilder getFiltersOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQuery.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQuery.java new file mode 100644 index 000000000000..5437216754a3 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQuery.java @@ -0,0 +1,596 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A query for resolving the schema relevant to the posed question.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaQuery} + */ +@com.google.protobuf.Generated +public final class SchemaQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.SchemaQuery) + SchemaQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaQuery"); + } + + // Use SchemaQuery.newBuilder() to construct. + private SchemaQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaQuery() { + question_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaQuery.class, + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder.class); + } + + public static final int QUESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object question_ = ""; + + /** + * + * + *
+   * Optional. The question to send to the system for schema resolution.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + @java.lang.Override + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + 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(); + question_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The question to send to the system for schema resolution.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, question_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(question_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, question_); + } + size += getUnknownFields().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.geminidataanalytics.v1.SchemaQuery)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.SchemaQuery other = + (com.google.cloud.geminidataanalytics.v1.SchemaQuery) obj; + + if (!getQuestion().equals(other.getQuestion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUESTION_FIELD_NUMBER; + hash = (53 * hash) + getQuestion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery 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.geminidataanalytics.v1.SchemaQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery 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.geminidataanalytics.v1.SchemaQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.SchemaQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A query for resolving the schema relevant to the posed question.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.SchemaQuery) + com.google.cloud.geminidataanalytics.v1.SchemaQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaQuery.class, + com.google.cloud.geminidataanalytics.v1.SchemaQuery.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.SchemaQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + question_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQuery getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQuery build() { + com.google.cloud.geminidataanalytics.v1.SchemaQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaQuery buildPartial() { + com.google.cloud.geminidataanalytics.v1.SchemaQuery result = + new com.google.cloud.geminidataanalytics.v1.SchemaQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.SchemaQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.question_ = question_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.SchemaQuery) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.SchemaQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.SchemaQuery other) { + if (other == com.google.cloud.geminidataanalytics.v1.SchemaQuery.getDefaultInstance()) + return this; + if (!other.getQuestion().isEmpty()) { + question_ = other.question_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + question_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object question_ = ""; + + /** + * + * + *
+     * Optional. The question to send to the system for schema resolution.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + public java.lang.String getQuestion() { + java.lang.Object ref = question_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + question_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The question to send to the system for schema resolution.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + public com.google.protobuf.ByteString getQuestionBytes() { + java.lang.Object ref = question_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + question_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The question to send to the system for schema resolution.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The question to set. + * @return This builder for chaining. + */ + public Builder setQuestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + question_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The question to send to the system for schema resolution.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQuestion() { + question_ = getDefaultInstance().getQuestion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The question to send to the system for schema resolution.
+     * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for question to set. + * @return This builder for chaining. + */ + public Builder setQuestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + question_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.SchemaQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.SchemaQuery) + private static final com.google.cloud.geminidataanalytics.v1.SchemaQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.SchemaQuery(); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.SchemaQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQueryOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQueryOrBuilder.java new file mode 100644 index 000000000000..81345506b4d9 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaQueryOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface SchemaQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.SchemaQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The question to send to the system for schema resolution.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The question. + */ + java.lang.String getQuestion(); + + /** + * + * + *
+   * Optional. The question to send to the system for schema resolution.
+   * 
+ * + * string question = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for question. + */ + com.google.protobuf.ByteString getQuestionBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResult.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResult.java new file mode 100644 index 000000000000..808ddd24fe4a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResult.java @@ -0,0 +1,979 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * The result of schema resolution.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaResult} + */ +@com.google.protobuf.Generated +public final class SchemaResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.SchemaResult) + SchemaResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaResult"); + } + + // Use SchemaResult.newBuilder() to construct. + private SchemaResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaResult() { + datasources_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaResult.class, + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder.class); + } + + public static final int DATASOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List datasources_; + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getDatasourcesList() { + return datasources_; + } + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDatasourcesOrBuilderList() { + return datasources_; + } + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDatasourcesCount() { + return datasources_.size(); + } + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index) { + return datasources_.get(index); + } + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder( + int index) { + return datasources_.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 < datasources_.size(); i++) { + output.writeMessage(1, datasources_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datasources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasources_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.SchemaResult)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.SchemaResult other = + (com.google.cloud.geminidataanalytics.v1.SchemaResult) obj; + + if (!getDatasourcesList().equals(other.getDatasourcesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDatasourcesCount() > 0) { + hash = (37 * hash) + DATASOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDatasourcesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult 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.geminidataanalytics.v1.SchemaResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult 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.geminidataanalytics.v1.SchemaResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.SchemaResult 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The result of schema resolution.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SchemaResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.SchemaResult) + com.google.cloud.geminidataanalytics.v1.SchemaResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SchemaResult.class, + com.google.cloud.geminidataanalytics.v1.SchemaResult.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.SchemaResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (datasourcesBuilder_ == null) { + datasources_ = java.util.Collections.emptyList(); + } else { + datasources_ = null; + datasourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SchemaResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResult getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResult build() { + com.google.cloud.geminidataanalytics.v1.SchemaResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaResult buildPartial() { + com.google.cloud.geminidataanalytics.v1.SchemaResult result = + new com.google.cloud.geminidataanalytics.v1.SchemaResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.SchemaResult result) { + if (datasourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datasources_ = java.util.Collections.unmodifiableList(datasources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasources_ = datasources_; + } else { + result.datasources_ = datasourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.SchemaResult result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.SchemaResult) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.SchemaResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.SchemaResult other) { + if (other == com.google.cloud.geminidataanalytics.v1.SchemaResult.getDefaultInstance()) + return this; + if (datasourcesBuilder_ == null) { + if (!other.datasources_.isEmpty()) { + if (datasources_.isEmpty()) { + datasources_ = other.datasources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasourcesIsMutable(); + datasources_.addAll(other.datasources_); + } + onChanged(); + } + } else { + if (!other.datasources_.isEmpty()) { + if (datasourcesBuilder_.isEmpty()) { + datasourcesBuilder_.dispose(); + datasourcesBuilder_ = null; + datasources_ = other.datasources_; + bitField0_ = (bitField0_ & ~0x00000001); + datasourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDatasourcesFieldBuilder() + : null; + } else { + datasourcesBuilder_.addAllMessages(other.datasources_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.Datasource m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.Datasource.parser(), + extensionRegistry); + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(m); + } else { + datasourcesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List datasources_ = + java.util.Collections.emptyList(); + + private void ensureDatasourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasources_ = + new java.util.ArrayList( + datasources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder> + datasourcesBuilder_; + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDatasourcesList() { + if (datasourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasources_); + } else { + return datasourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDatasourcesCount() { + if (datasourcesBuilder_ == null) { + return datasources_.size(); + } else { + return datasourcesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index) { + if (datasourcesBuilder_ == null) { + return datasources_.get(index); + } else { + return datasourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.set(index, value); + onChanged(); + } else { + datasourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.set(index, builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources(com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.add(value); + onChanged(); + } else { + datasourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource value) { + if (datasourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasourcesIsMutable(); + datasources_.add(index, value); + onChanged(); + } else { + datasourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDatasources( + int index, com.google.cloud.geminidataanalytics.v1.Datasource.Builder builderForValue) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.add(index, builderForValue.build()); + onChanged(); + } else { + datasourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDatasources( + java.lang.Iterable values) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasources_); + onChanged(); + } else { + datasourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatasources() { + if (datasourcesBuilder_ == null) { + datasources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datasourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDatasources(int index) { + if (datasourcesBuilder_ == null) { + ensureDatasourcesIsMutable(); + datasources_.remove(index); + onChanged(); + } else { + datasourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder getDatasourcesBuilder( + int index) { + return internalGetDatasourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder( + int index) { + if (datasourcesBuilder_ == null) { + return datasources_.get(index); + } else { + return datasourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDatasourcesOrBuilderList() { + if (datasourcesBuilder_ != null) { + return datasourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasources_); + } + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder addDatasourcesBuilder() { + return internalGetDatasourcesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Datasource.Builder addDatasourcesBuilder( + int index) { + return internalGetDatasourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.Datasource.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The datasources used to resolve the schema query.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDatasourcesBuilderList() { + return internalGetDatasourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder> + internalGetDatasourcesFieldBuilder() { + if (datasourcesBuilder_ == null) { + datasourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Datasource, + com.google.cloud.geminidataanalytics.v1.Datasource.Builder, + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder>( + datasources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datasources_ = null; + } + return datasourcesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.SchemaResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.SchemaResult) + private static final com.google.cloud.geminidataanalytics.v1.SchemaResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.SchemaResult(); + } + + public static com.google.cloud.geminidataanalytics.v1.SchemaResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.SchemaResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResultOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResultOrBuilder.java new file mode 100644 index 000000000000..6d38e28411ee --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SchemaResultOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface SchemaResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.SchemaResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getDatasourcesList(); + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.Datasource getDatasources(int index); + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDatasourcesCount(); + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDatasourcesOrBuilderList(); + + /** + * + * + *
+   * Optional. The datasources used to resolve the schema query.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.Datasource datasources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.DatasourceOrBuilder getDatasourcesOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessage.java new file mode 100644 index 000000000000..a0c265bbc511 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessage.java @@ -0,0 +1,889 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A stored message containing user message or system message.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StorageMessage} + */ +@com.google.protobuf.Generated +public final class StorageMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.StorageMessage) + StorageMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StorageMessage"); + } + + // Use StorageMessage.newBuilder() to construct. + private StorageMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StorageMessage() { + messageId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StorageMessage.class, + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder.class); + } + + private int bitField0_; + public static final int MESSAGE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + + /** + * + * + *
+   * The unique resource name of a chat message.
+   * 
+ * + * string message_id = 1; + * + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + 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(); + messageId_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique resource name of a chat message.
+   * 
+ * + * string message_id = 1; + * + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + private com.google.cloud.geminidataanalytics.v1.Message message_; + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return Whether the message field is set. + */ + @java.lang.Override + public boolean hasMessage() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return The message. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Message getMessage() { + return message_ == null + ? com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance() + : message_; + } + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessageOrBuilder() { + return message_ == null + ? com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance() + : message_; + } + + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMessage()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMessage()); + } + size += getUnknownFields().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.geminidataanalytics.v1.StorageMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.StorageMessage other = + (com.google.cloud.geminidataanalytics.v1.StorageMessage) obj; + + if (!getMessageId().equals(other.getMessageId())) return false; + if (hasMessage() != other.hasMessage()) return false; + if (hasMessage()) { + if (!getMessage().equals(other.getMessage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + if (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage 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.geminidataanalytics.v1.StorageMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage 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.geminidataanalytics.v1.StorageMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.StorageMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A stored message containing user message or system message.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StorageMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.StorageMessage) + com.google.cloud.geminidataanalytics.v1.StorageMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StorageMessage.class, + com.google.cloud.geminidataanalytics.v1.StorageMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.StorageMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMessageFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + messageId_ = ""; + message_ = null; + if (messageBuilder_ != null) { + messageBuilder_.dispose(); + messageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_StorageMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StorageMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.StorageMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StorageMessage build() { + com.google.cloud.geminidataanalytics.v1.StorageMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StorageMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.StorageMessage result = + new com.google.cloud.geminidataanalytics.v1.StorageMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.StorageMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.messageId_ = messageId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = messageBuilder_ == null ? message_ : messageBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.StorageMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.StorageMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.StorageMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.StorageMessage.getDefaultInstance()) + return this; + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMessage()) { + mergeMessage(other.getMessage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetMessageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object messageId_ = ""; + + /** + * + * + *
+     * The unique resource name of a chat message.
+     * 
+ * + * string message_id = 1; + * + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique resource name of a chat message.
+     * 
+ * + * string message_id = 1; + * + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique resource name of a chat message.
+     * 
+ * + * string message_id = 1; + * + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + messageId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique resource name of a chat message.
+     * 
+ * + * string message_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique resource name of a chat message.
+     * 
+ * + * string message_id = 1; + * + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Message message_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder> + messageBuilder_; + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return Whether the message field is set. + */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return The message. + */ + public com.google.cloud.geminidataanalytics.v1.Message getMessage() { + if (messageBuilder_ == null) { + return message_ == null + ? com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance() + : message_; + } else { + return messageBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public Builder setMessage(com.google.cloud.geminidataanalytics.v1.Message value) { + if (messageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + } else { + messageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public Builder setMessage( + com.google.cloud.geminidataanalytics.v1.Message.Builder builderForValue) { + if (messageBuilder_ == null) { + message_ = builderForValue.build(); + } else { + messageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public Builder mergeMessage(com.google.cloud.geminidataanalytics.v1.Message value) { + if (messageBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && message_ != null + && message_ != com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance()) { + getMessageBuilder().mergeFrom(value); + } else { + message_ = value; + } + } else { + messageBuilder_.mergeFrom(value); + } + if (message_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public Builder clearMessage() { + bitField0_ = (bitField0_ & ~0x00000002); + message_ = null; + if (messageBuilder_ != null) { + messageBuilder_.dispose(); + messageBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public com.google.cloud.geminidataanalytics.v1.Message.Builder getMessageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetMessageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + public com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessageOrBuilder() { + if (messageBuilder_ != null) { + return messageBuilder_.getMessageOrBuilder(); + } else { + return message_ == null + ? com.google.cloud.geminidataanalytics.v1.Message.getDefaultInstance() + : message_; + } + } + + /** + * + * + *
+     * The message content.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder> + internalGetMessageFieldBuilder() { + if (messageBuilder_ == null) { + messageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Message, + com.google.cloud.geminidataanalytics.v1.Message.Builder, + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder>( + getMessage(), getParentForChildren(), isClean()); + message_ = null; + } + return messageBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.StorageMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.StorageMessage) + private static final com.google.cloud.geminidataanalytics.v1.StorageMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.StorageMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.StorageMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.StorageMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessageOrBuilder.java new file mode 100644 index 000000000000..0c1e10868e0c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StorageMessageOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface StorageMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.StorageMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique resource name of a chat message.
+   * 
+ * + * string message_id = 1; + * + * @return The messageId. + */ + java.lang.String getMessageId(); + + /** + * + * + *
+   * The unique resource name of a chat message.
+   * 
+ * + * string message_id = 1; + * + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString getMessageIdBytes(); + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return Whether the message field is set. + */ + boolean hasMessage(); + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + * + * @return The message. + */ + com.google.cloud.geminidataanalytics.v1.Message getMessage(); + + /** + * + * + *
+   * The message content.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.Message message = 2; + */ + com.google.cloud.geminidataanalytics.v1.MessageOrBuilder getMessageOrBuilder(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReference.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReference.java new file mode 100644 index 000000000000..61269e976018 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReference.java @@ -0,0 +1,606 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing a reference to a single Looker Studio datasource.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StudioDatasourceReference} + */ +@com.google.protobuf.Generated +public final class StudioDatasourceReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.StudioDatasourceReference) + StudioDatasourceReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StudioDatasourceReference"); + } + + // Use StudioDatasourceReference.newBuilder() to construct. + private StudioDatasourceReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StudioDatasourceReference() { + datasourceId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.class, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder.class); + } + + public static final int DATASOURCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasourceId_ = ""; + + /** + * + * + *
+   * Required. The id of the datasource.
+   * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasourceId. + */ + @java.lang.Override + public java.lang.String getDatasourceId() { + java.lang.Object ref = datasourceId_; + 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(); + datasourceId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The id of the datasource.
+   * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasourceIdBytes() { + java.lang.Object ref = datasourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasourceId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasourceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, datasourceId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasourceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, datasourceId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.StudioDatasourceReference)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference other = + (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference) obj; + + if (!getDatasourceId().equals(other.getDatasourceId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATASOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasourceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference 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.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference 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.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.StudioDatasourceReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing a reference to a single Looker Studio datasource.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StudioDatasourceReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.StudioDatasourceReference) + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.class, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + datasourceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference build() { + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference buildPartial() { + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference result = + new com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.datasourceId_ = datasourceId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference other) { + if (other + == com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.getDefaultInstance()) + return this; + if (!other.getDatasourceId().isEmpty()) { + datasourceId_ = other.datasourceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object datasourceId_ = ""; + + /** + * + * + *
+     * Required. The id of the datasource.
+     * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasourceId. + */ + public java.lang.String getDatasourceId() { + java.lang.Object ref = datasourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The id of the datasource.
+     * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasourceId. + */ + public com.google.protobuf.ByteString getDatasourceIdBytes() { + java.lang.Object ref = datasourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The id of the datasource.
+     * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasourceId to set. + * @return This builder for chaining. + */ + public Builder setDatasourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasourceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The id of the datasource.
+     * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasourceId() { + datasourceId_ = getDefaultInstance().getDatasourceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The id of the datasource.
+     * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasourceId to set. + * @return This builder for chaining. + */ + public Builder setDatasourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasourceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.StudioDatasourceReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.StudioDatasourceReference) + private static final com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference(); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudioDatasourceReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.StudioDatasourceReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferenceOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferenceOrBuilder.java new file mode 100644 index 000000000000..b4c0fcc4dc67 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferenceOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface StudioDatasourceReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.StudioDatasourceReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The id of the datasource.
+   * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasourceId. + */ + java.lang.String getDatasourceId(); + + /** + * + * + *
+   * Required. The id of the datasource.
+   * 
+ * + * string datasource_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasourceId. + */ + com.google.protobuf.ByteString getDatasourceIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferences.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferences.java new file mode 100644 index 000000000000..f8ebec6f14e9 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferences.java @@ -0,0 +1,1012 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message representing references to Looker Studio datasources.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StudioDatasourceReferences} + */ +@com.google.protobuf.Generated +public final class StudioDatasourceReferences extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + StudioDatasourceReferencesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StudioDatasourceReferences"); + } + + // Use StudioDatasourceReferences.newBuilder() to construct. + private StudioDatasourceReferences(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StudioDatasourceReferences() { + studioReferences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.class, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder.class); + } + + public static final int STUDIO_REFERENCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + studioReferences_; + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getStudioReferencesList() { + return studioReferences_; + } + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder> + getStudioReferencesOrBuilderList() { + return studioReferences_; + } + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getStudioReferencesCount() { + return studioReferences_.size(); + } + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference getStudioReferences( + int index) { + return studioReferences_.get(index); + } + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder + getStudioReferencesOrBuilder(int index) { + return studioReferences_.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 < studioReferences_.size(); i++) { + output.writeMessage(2, studioReferences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < studioReferences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, studioReferences_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.StudioDatasourceReferences)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences other = + (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) obj; + + if (!getStudioReferencesList().equals(other.getStudioReferencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStudioReferencesCount() > 0) { + hash = (37 * hash) + STUDIO_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getStudioReferencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences 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.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences 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.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.StudioDatasourceReferences 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing references to Looker Studio datasources.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.StudioDatasourceReferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.class, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.Builder.class); + } + + // Construct using + // com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (studioReferencesBuilder_ == null) { + studioReferences_ = java.util.Collections.emptyList(); + } else { + studioReferences_ = null; + studioReferencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DatasourceProto + .internal_static_google_cloud_geminidataanalytics_v1_StudioDatasourceReferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences build() { + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences buildPartial() { + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences result = + new com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences result) { + if (studioReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + studioReferences_ = java.util.Collections.unmodifiableList(studioReferences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.studioReferences_ = studioReferences_; + } else { + result.studioReferences_ = studioReferencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) { + return mergeFrom( + (com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences other) { + if (other + == com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + .getDefaultInstance()) return this; + if (studioReferencesBuilder_ == null) { + if (!other.studioReferences_.isEmpty()) { + if (studioReferences_.isEmpty()) { + studioReferences_ = other.studioReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStudioReferencesIsMutable(); + studioReferences_.addAll(other.studioReferences_); + } + onChanged(); + } + } else { + if (!other.studioReferences_.isEmpty()) { + if (studioReferencesBuilder_.isEmpty()) { + studioReferencesBuilder_.dispose(); + studioReferencesBuilder_ = null; + studioReferences_ = other.studioReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + studioReferencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStudioReferencesFieldBuilder() + : null; + } else { + studioReferencesBuilder_.addAllMessages(other.studioReferences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.parser(), + extensionRegistry); + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + studioReferences_.add(m); + } else { + studioReferencesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + studioReferences_ = java.util.Collections.emptyList(); + + private void ensureStudioReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + studioReferences_ = + new java.util.ArrayList< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference>( + studioReferences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder> + studioReferencesBuilder_; + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getStudioReferencesList() { + if (studioReferencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(studioReferences_); + } else { + return studioReferencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getStudioReferencesCount() { + if (studioReferencesBuilder_ == null) { + return studioReferences_.size(); + } else { + return studioReferencesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference getStudioReferences( + int index) { + if (studioReferencesBuilder_ == null) { + return studioReferences_.get(index); + } else { + return studioReferencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStudioReferences( + int index, com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference value) { + if (studioReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStudioReferencesIsMutable(); + studioReferences_.set(index, value); + onChanged(); + } else { + studioReferencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStudioReferences( + int index, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder builderForValue) { + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + studioReferences_.set(index, builderForValue.build()); + onChanged(); + } else { + studioReferencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStudioReferences( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference value) { + if (studioReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStudioReferencesIsMutable(); + studioReferences_.add(value); + onChanged(); + } else { + studioReferencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStudioReferences( + int index, com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference value) { + if (studioReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStudioReferencesIsMutable(); + studioReferences_.add(index, value); + onChanged(); + } else { + studioReferencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStudioReferences( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder builderForValue) { + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + studioReferences_.add(builderForValue.build()); + onChanged(); + } else { + studioReferencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStudioReferences( + int index, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder builderForValue) { + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + studioReferences_.add(index, builderForValue.build()); + onChanged(); + } else { + studioReferencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllStudioReferences( + java.lang.Iterable< + ? extends com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference> + values) { + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, studioReferences_); + onChanged(); + } else { + studioReferencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStudioReferences() { + if (studioReferencesBuilder_ == null) { + studioReferences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + studioReferencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeStudioReferences(int index) { + if (studioReferencesBuilder_ == null) { + ensureStudioReferencesIsMutable(); + studioReferences_.remove(index); + onChanged(); + } else { + studioReferencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder + getStudioReferencesBuilder(int index) { + return internalGetStudioReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder + getStudioReferencesOrBuilder(int index) { + if (studioReferencesBuilder_ == null) { + return studioReferences_.get(index); + } else { + return studioReferencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder> + getStudioReferencesOrBuilderList() { + if (studioReferencesBuilder_ != null) { + return studioReferencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(studioReferences_); + } + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder + addStudioReferencesBuilder() { + return internalGetStudioReferencesFieldBuilder() + .addBuilder( + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder + addStudioReferencesBuilder(int index) { + return internalGetStudioReferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The references to the studio datasources.
+     * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getStudioReferencesBuilderList() { + return internalGetStudioReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder> + internalGetStudioReferencesFieldBuilder() { + if (studioReferencesBuilder_ == null) { + studioReferencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference.Builder, + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder>( + studioReferences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + studioReferences_ = null; + } + return studioReferencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + private static final com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences(); + } + + public static com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferences + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudioDatasourceReferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.StudioDatasourceReferences + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferencesOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferencesOrBuilder.java new file mode 100644 index 000000000000..55b066dc46ac --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/StudioDatasourceReferencesOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/datasource.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface StudioDatasourceReferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.StudioDatasourceReferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getStudioReferencesList(); + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReference getStudioReferences(int index); + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getStudioReferencesCount(); + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder> + getStudioReferencesOrBuilderList(); + + /** + * + * + *
+   * Optional. The references to the studio datasources.
+   * 
+ * + * + * repeated .google.cloud.geminidataanalytics.v1.StudioDatasourceReference studio_references = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.StudioDatasourceReferenceOrBuilder + getStudioReferencesOrBuilder(int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessage.java new file mode 100644 index 000000000000..f798d528b9b5 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessage.java @@ -0,0 +1,3138 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message from the system in response to the user. This message can also be a
+ * message from the user as historical context for multi-turn conversations with
+ * the system.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SystemMessage} + */ +@com.google.protobuf.Generated +public final class SystemMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.SystemMessage) + SystemMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SystemMessage"); + } + + // Use SystemMessage.newBuilder() to construct. + private SystemMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SystemMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SystemMessage.class, + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder.class); + } + + private int bitField0_; + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + SCHEMA(2), + DATA(3), + ANALYSIS(4), + CHART(5), + ERROR(6), + EXAMPLE_QUERIES(13), + 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 TEXT; + case 2: + return SCHEMA; + case 3: + return DATA; + case 4: + return ANALYSIS; + case 5: + return CHART; + case 6: + return ERROR; + case 13: + return EXAMPLE_QUERIES; + 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 TEXT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage getText() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder getTextOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessage getSchema() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder getSchemaOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + + public static final int DATA_FIELD_NUMBER = 3; + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return kindCase_ == 3; + } + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return The data. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessage getData() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder getDataOrBuilder() { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + + public static final int ANALYSIS_FIELD_NUMBER = 4; + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return kindCase_ == 4; + } + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage getAnalysis() { + if (kindCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder getAnalysisOrBuilder() { + if (kindCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + + public static final int CHART_FIELD_NUMBER = 5; + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return Whether the chart field is set. + */ + @java.lang.Override + public boolean hasChart() { + return kindCase_ == 5; + } + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return The chart. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessage getChart() { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder getChartOrBuilder() { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 6; + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return kindCase_ == 6; + } + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessage getError() { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder getErrorOrBuilder() { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + + public static final int EXAMPLE_QUERIES_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exampleQueries field is set. + */ + @java.lang.Override + public boolean hasExampleQueries() { + return kindCase_ == 13; + } + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exampleQueries. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueries getExampleQueries() { + if (kindCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder + getExampleQueriesOrBuilder() { + if (kindCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + + public static final int GROUP_ID_FIELD_NUMBER = 12; + private int groupId_ = 0; + + /** + * + * + *
+   * Identifies the group that the event belongs to. Similar events are deemed
+   * to be logically relevant to each other and should be shown together in
+   * the UI.
+   * 
+ * + * optional int32 group_id = 12; + * + * @return Whether the groupId field is set. + */ + @java.lang.Override + public boolean hasGroupId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Identifies the group that the event belongs to. Similar events are deemed
+   * to be logically relevant to each other and should be shown together in
+   * the UI.
+   * 
+ * + * optional int32 group_id = 12; + * + * @return The groupId. + */ + @java.lang.Override + public int getGroupId() { + return groupId_; + } + + public static final int CITATION_FIELD_NUMBER = 15; + private com.google.cloud.geminidataanalytics.v1.Citation citation_; + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the citation field is set. + */ + @java.lang.Override + public boolean hasCitation() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The citation. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.Citation getCitation() { + return citation_ == null + ? com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance() + : citation_; + } + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.CitationOrBuilder getCitationOrBuilder() { + return citation_ == null + ? com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance() + : citation_; + } + + 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.geminidataanalytics.v1.TextMessage) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_); + } + if (kindCase_ == 4) { + output.writeMessage(4, (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(12, groupId_); + } + if (kindCase_ == 13) { + output.writeMessage(13, (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(15, getCitation()); + } + getUnknownFields().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.geminidataanalytics.v1.TextMessage) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_); + } + if (kindCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, groupId_); + } + if (kindCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getCitation()); + } + size += getUnknownFields().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.geminidataanalytics.v1.SystemMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.SystemMessage other = + (com.google.cloud.geminidataanalytics.v1.SystemMessage) obj; + + if (hasGroupId() != other.hasGroupId()) return false; + if (hasGroupId()) { + if (getGroupId() != other.getGroupId()) return false; + } + if (hasCitation() != other.hasCitation()) return false; + if (hasCitation()) { + if (!getCitation().equals(other.getCitation())) return false; + } + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getText().equals(other.getText())) return false; + break; + case 2: + if (!getSchema().equals(other.getSchema())) return false; + break; + case 3: + if (!getData().equals(other.getData())) return false; + break; + case 4: + if (!getAnalysis().equals(other.getAnalysis())) return false; + break; + case 5: + if (!getChart().equals(other.getChart())) return false; + break; + case 6: + if (!getError().equals(other.getError())) return false; + break; + case 13: + if (!getExampleQueries().equals(other.getExampleQueries())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGroupId()) { + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId(); + } + if (hasCitation()) { + hash = (37 * hash) + CITATION_FIELD_NUMBER; + hash = (53 * hash) + getCitation().hashCode(); + } + switch (kindCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 2: + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + break; + case 3: + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + break; + case 4: + hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysis().hashCode(); + break; + case 5: + hash = (37 * hash) + CHART_FIELD_NUMBER; + hash = (53 * hash) + getChart().hashCode(); + break; + case 6: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 13: + hash = (37 * hash) + EXAMPLE_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getExampleQueries().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage 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.geminidataanalytics.v1.SystemMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage 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.geminidataanalytics.v1.SystemMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.SystemMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message from the system in response to the user. This message can also be a
+   * message from the user as historical context for multi-turn conversations with
+   * the system.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.SystemMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.SystemMessage) + com.google.cloud.geminidataanalytics.v1.SystemMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.SystemMessage.class, + com.google.cloud.geminidataanalytics.v1.SystemMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.SystemMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCitationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textBuilder_ != null) { + textBuilder_.clear(); + } + if (schemaBuilder_ != null) { + schemaBuilder_.clear(); + } + if (dataBuilder_ != null) { + dataBuilder_.clear(); + } + if (analysisBuilder_ != null) { + analysisBuilder_.clear(); + } + if (chartBuilder_ != null) { + chartBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (exampleQueriesBuilder_ != null) { + exampleQueriesBuilder_.clear(); + } + groupId_ = 0; + citation_ = null; + if (citationBuilder_ != null) { + citationBuilder_.dispose(); + citationBuilder_ = null; + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_SystemMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessage build() { + com.google.cloud.geminidataanalytics.v1.SystemMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SystemMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.SystemMessage result = + new com.google.cloud.geminidataanalytics.v1.SystemMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.SystemMessage result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.groupId_ = groupId_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.citation_ = citationBuilder_ == null ? citation_ : citationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.SystemMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && textBuilder_ != null) { + result.kind_ = textBuilder_.build(); + } + if (kindCase_ == 2 && schemaBuilder_ != null) { + result.kind_ = schemaBuilder_.build(); + } + if (kindCase_ == 3 && dataBuilder_ != null) { + result.kind_ = dataBuilder_.build(); + } + if (kindCase_ == 4 && analysisBuilder_ != null) { + result.kind_ = analysisBuilder_.build(); + } + if (kindCase_ == 5 && chartBuilder_ != null) { + result.kind_ = chartBuilder_.build(); + } + if (kindCase_ == 6 && errorBuilder_ != null) { + result.kind_ = errorBuilder_.build(); + } + if (kindCase_ == 13 && exampleQueriesBuilder_ != null) { + result.kind_ = exampleQueriesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.SystemMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.SystemMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.SystemMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.SystemMessage.getDefaultInstance()) + return this; + if (other.hasGroupId()) { + setGroupId(other.getGroupId()); + } + if (other.hasCitation()) { + mergeCitation(other.getCitation()); + } + switch (other.getKindCase()) { + case TEXT: + { + mergeText(other.getText()); + break; + } + case SCHEMA: + { + mergeSchema(other.getSchema()); + break; + } + case DATA: + { + mergeData(other.getData()); + break; + } + case ANALYSIS: + { + mergeAnalysis(other.getAnalysis()); + break; + } + case CHART: + { + mergeChart(other.getChart()); + break; + } + case ERROR: + { + mergeError(other.getError()); + break; + } + case EXAMPLE_QUERIES: + { + mergeExampleQueries(other.getExampleQueries()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetTextFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetDataFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetAnalysisFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetChartFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 6; + break; + } // case 50 + case 96: + { + groupId_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 96 + case 106: + { + input.readMessage( + internalGetExampleQueriesFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 + case 122: + { + input.readMessage( + internalGetCitationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 122 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.TextMessage, + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder, + com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder> + textBuilder_; + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage getText() { + if (textBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return textBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + public Builder setText(com.google.cloud.geminidataanalytics.v1.TextMessage value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + public Builder setText( + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder builderForValue) { + if (textBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + public Builder mergeText(com.google.cloud.geminidataanalytics.v1.TextMessage value) { + if (textBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.TextMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + textBuilder_.mergeFrom(value); + } else { + textBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + public Builder clearText() { + if (textBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + textBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + public com.google.cloud.geminidataanalytics.v1.TextMessage.Builder getTextBuilder() { + return internalGetTextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder getTextOrBuilder() { + if ((kindCase_ == 1) && (textBuilder_ != null)) { + return textBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A direct natural language response to the user message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.TextMessage, + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder, + com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder> + internalGetTextFieldBuilder() { + if (textBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + textBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.TextMessage, + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder, + com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.TextMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return textBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaMessage, + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder> + schemaBuilder_; + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessage getSchema() { + if (schemaBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return schemaBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + public Builder setSchema(com.google.cloud.geminidataanalytics.v1.SchemaMessage value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + public Builder setSchema( + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder builderForValue) { + if (schemaBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + public Builder mergeSchema(com.google.cloud.geminidataanalytics.v1.SchemaMessage value) { + if (schemaBuilder_ == null) { + if (kindCase_ == 2 + && kind_ + != com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.SchemaMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + schemaBuilder_.mergeFrom(value); + } else { + schemaBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + public Builder clearSchema() { + if (schemaBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + schemaBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + public com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder getSchemaBuilder() { + return internalGetSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder getSchemaOrBuilder() { + if ((kindCase_ == 2) && (schemaBuilder_ != null)) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during schema resolution.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaMessage, + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder> + internalGetSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.geminidataanalytics.v1.SchemaMessage.getDefaultInstance(); + } + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.SchemaMessage, + com.google.cloud.geminidataanalytics.v1.SchemaMessage.Builder, + com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.SchemaMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return schemaBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataMessage, + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder, + com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder> + dataBuilder_; + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return kindCase_ == 3; + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return The data. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessage getData() { + if (dataBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return dataBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + public Builder setData(com.google.cloud.geminidataanalytics.v1.DataMessage value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + public Builder setData( + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder builderForValue) { + if (dataBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + public Builder mergeData(com.google.cloud.geminidataanalytics.v1.DataMessage value) { + if (dataBuilder_ == null) { + if (kindCase_ == 3 + && kind_ != com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.DataMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + dataBuilder_.mergeFrom(value); + } else { + dataBuilder_.setMessage(value); + } + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + dataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + public com.google.cloud.geminidataanalytics.v1.DataMessage.Builder getDataBuilder() { + return internalGetDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder getDataOrBuilder() { + if ((kindCase_ == 3) && (dataBuilder_ != null)) { + return dataBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during data retrieval.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataMessage, + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder, + com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder> + internalGetDataFieldBuilder() { + if (dataBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = com.google.cloud.geminidataanalytics.v1.DataMessage.getDefaultInstance(); + } + dataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataMessage, + com.google.cloud.geminidataanalytics.v1.DataMessage.Builder, + com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.DataMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged(); + return dataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisMessage, + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder> + analysisBuilder_; + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return kindCase_ == 4; + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage getAnalysis() { + if (analysisBuilder_ == null) { + if (kindCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return analysisBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + public Builder setAnalysis(com.google.cloud.geminidataanalytics.v1.AnalysisMessage value) { + if (analysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + analysisBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + public Builder setAnalysis( + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder builderForValue) { + if (analysisBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + analysisBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + public Builder mergeAnalysis(com.google.cloud.geminidataanalytics.v1.AnalysisMessage value) { + if (analysisBuilder_ == null) { + if (kindCase_ == 4 + && kind_ + != com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + analysisBuilder_.mergeFrom(value); + } else { + analysisBuilder_.setMessage(value); + } + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + public Builder clearAnalysis() { + if (analysisBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + analysisBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + public com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder getAnalysisBuilder() { + return internalGetAnalysisFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder getAnalysisOrBuilder() { + if ((kindCase_ == 4) && (analysisBuilder_ != null)) { + return analysisBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during analysis.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisMessage, + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder> + internalGetAnalysisFieldBuilder() { + if (analysisBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = com.google.cloud.geminidataanalytics.v1.AnalysisMessage.getDefaultInstance(); + } + analysisBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.AnalysisMessage, + com.google.cloud.geminidataanalytics.v1.AnalysisMessage.Builder, + com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.AnalysisMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 4; + onChanged(); + return analysisBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartMessage, + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder> + chartBuilder_; + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return Whether the chart field is set. + */ + @java.lang.Override + public boolean hasChart() { + return kindCase_ == 5; + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return The chart. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessage getChart() { + if (chartBuilder_ == null) { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return chartBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + public Builder setChart(com.google.cloud.geminidataanalytics.v1.ChartMessage value) { + if (chartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + chartBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + public Builder setChart( + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder builderForValue) { + if (chartBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + chartBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + public Builder mergeChart(com.google.cloud.geminidataanalytics.v1.ChartMessage value) { + if (chartBuilder_ == null) { + if (kindCase_ == 5 + && kind_ != com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.ChartMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + chartBuilder_.mergeFrom(value); + } else { + chartBuilder_.setMessage(value); + } + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + public Builder clearChart() { + if (chartBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + chartBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + public com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder getChartBuilder() { + return internalGetChartFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder getChartOrBuilder() { + if ((kindCase_ == 5) && (chartBuilder_ != null)) { + return chartBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A message produced during chart generation.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartMessage, + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder> + internalGetChartFieldBuilder() { + if (chartBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = com.google.cloud.geminidataanalytics.v1.ChartMessage.getDefaultInstance(); + } + chartBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ChartMessage, + com.google.cloud.geminidataanalytics.v1.ChartMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ChartMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 5; + onChanged(); + return chartBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ErrorMessage, + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return kindCase_ == 6; + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessage getError() { + if (errorBuilder_ == null) { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return errorBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + public Builder setError(com.google.cloud.geminidataanalytics.v1.ErrorMessage value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + public Builder setError( + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder builderForValue) { + if (errorBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + public Builder mergeError(com.google.cloud.geminidataanalytics.v1.ErrorMessage value) { + if (errorBuilder_ == null) { + if (kindCase_ == 6 + && kind_ != com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.ErrorMessage.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + errorBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + public com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder getErrorBuilder() { + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder getErrorOrBuilder() { + if ((kindCase_ == 6) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * An error message.
+     * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ErrorMessage, + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = com.google.cloud.geminidataanalytics.v1.ErrorMessage.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ErrorMessage, + com.google.cloud.geminidataanalytics.v1.ErrorMessage.Builder, + com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ErrorMessage) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 6; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQueries, + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder> + exampleQueriesBuilder_; + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exampleQueries field is set. + */ + @java.lang.Override + public boolean hasExampleQueries() { + return kindCase_ == 13; + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exampleQueries. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueries getExampleQueries() { + if (exampleQueriesBuilder_ == null) { + if (kindCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } else { + if (kindCase_ == 13) { + return exampleQueriesBuilder_.getMessage(); + } + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries(com.google.cloud.geminidataanalytics.v1.ExampleQueries value) { + if (exampleQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(value); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExampleQueries( + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder builderForValue) { + if (exampleQueriesBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + exampleQueriesBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExampleQueries( + com.google.cloud.geminidataanalytics.v1.ExampleQueries value) { + if (exampleQueriesBuilder_ == null) { + if (kindCase_ == 13 + && kind_ + != com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance()) { + kind_ = + com.google.cloud.geminidataanalytics.v1.ExampleQueries.newBuilder( + (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 13) { + exampleQueriesBuilder_.mergeFrom(value); + } else { + exampleQueriesBuilder_.setMessage(value); + } + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExampleQueries() { + if (exampleQueriesBuilder_ == null) { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + } + exampleQueriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder + getExampleQueriesBuilder() { + return internalGetExampleQueriesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder + getExampleQueriesOrBuilder() { + if ((kindCase_ == 13) && (exampleQueriesBuilder_ != null)) { + return exampleQueriesBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 13) { + return (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_; + } + return com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A message containing example queries.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQueries, + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder> + internalGetExampleQueriesFieldBuilder() { + if (exampleQueriesBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.cloud.geminidataanalytics.v1.ExampleQueries.getDefaultInstance(); + } + exampleQueriesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.ExampleQueries, + com.google.cloud.geminidataanalytics.v1.ExampleQueries.Builder, + com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder>( + (com.google.cloud.geminidataanalytics.v1.ExampleQueries) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 13; + onChanged(); + return exampleQueriesBuilder_; + } + + private int groupId_; + + /** + * + * + *
+     * Identifies the group that the event belongs to. Similar events are deemed
+     * to be logically relevant to each other and should be shown together in
+     * the UI.
+     * 
+ * + * optional int32 group_id = 12; + * + * @return Whether the groupId field is set. + */ + @java.lang.Override + public boolean hasGroupId() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Identifies the group that the event belongs to. Similar events are deemed
+     * to be logically relevant to each other and should be shown together in
+     * the UI.
+     * 
+ * + * optional int32 group_id = 12; + * + * @return The groupId. + */ + @java.lang.Override + public int getGroupId() { + return groupId_; + } + + /** + * + * + *
+     * Identifies the group that the event belongs to. Similar events are deemed
+     * to be logically relevant to each other and should be shown together in
+     * the UI.
+     * 
+ * + * optional int32 group_id = 12; + * + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(int value) { + + groupId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifies the group that the event belongs to. Similar events are deemed
+     * to be logically relevant to each other and should be shown together in
+     * the UI.
+     * 
+ * + * optional int32 group_id = 12; + * + * @return This builder for chaining. + */ + public Builder clearGroupId() { + bitField0_ = (bitField0_ & ~0x00000080); + groupId_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.geminidataanalytics.v1.Citation citation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Citation, + com.google.cloud.geminidataanalytics.v1.Citation.Builder, + com.google.cloud.geminidataanalytics.v1.CitationOrBuilder> + citationBuilder_; + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the citation field is set. + */ + public boolean hasCitation() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The citation. + */ + public com.google.cloud.geminidataanalytics.v1.Citation getCitation() { + if (citationBuilder_ == null) { + return citation_ == null + ? com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance() + : citation_; + } else { + return citationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCitation(com.google.cloud.geminidataanalytics.v1.Citation value) { + if (citationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + citation_ = value; + } else { + citationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCitation( + com.google.cloud.geminidataanalytics.v1.Citation.Builder builderForValue) { + if (citationBuilder_ == null) { + citation_ = builderForValue.build(); + } else { + citationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCitation(com.google.cloud.geminidataanalytics.v1.Citation value) { + if (citationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && citation_ != null + && citation_ != com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance()) { + getCitationBuilder().mergeFrom(value); + } else { + citation_ = value; + } + } else { + citationBuilder_.mergeFrom(value); + } + if (citation_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCitation() { + bitField0_ = (bitField0_ & ~0x00000100); + citation_ = null; + if (citationBuilder_ != null) { + citationBuilder_.dispose(); + citationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.Citation.Builder getCitationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetCitationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.geminidataanalytics.v1.CitationOrBuilder getCitationOrBuilder() { + if (citationBuilder_ != null) { + return citationBuilder_.getMessageOrBuilder(); + } else { + return citation_ == null + ? com.google.cloud.geminidataanalytics.v1.Citation.getDefaultInstance() + : citation_; + } + } + + /** + * + * + *
+     * Output only. Citation information for the system message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Citation, + com.google.cloud.geminidataanalytics.v1.Citation.Builder, + com.google.cloud.geminidataanalytics.v1.CitationOrBuilder> + internalGetCitationFieldBuilder() { + if (citationBuilder_ == null) { + citationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.Citation, + com.google.cloud.geminidataanalytics.v1.Citation.Builder, + com.google.cloud.geminidataanalytics.v1.CitationOrBuilder>( + getCitation(), getParentForChildren(), isClean()); + citation_ = null; + } + return citationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.SystemMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.SystemMessage) + private static final com.google.cloud.geminidataanalytics.v1.SystemMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.SystemMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.SystemMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SystemMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.SystemMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessageOrBuilder.java new file mode 100644 index 000000000000..8aee8419b3a8 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/SystemMessageOrBuilder.java @@ -0,0 +1,368 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface SystemMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.SystemMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return Whether the text field is set. + */ + boolean hasText(); + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + * + * @return The text. + */ + com.google.cloud.geminidataanalytics.v1.TextMessage getText(); + + /** + * + * + *
+   * A direct natural language response to the user message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.TextMessage text = 1; + */ + com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder getTextOrBuilder(); + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + * + * @return The schema. + */ + com.google.cloud.geminidataanalytics.v1.SchemaMessage getSchema(); + + /** + * + * + *
+   * A message produced during schema resolution.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.SchemaMessage schema = 2; + */ + com.google.cloud.geminidataanalytics.v1.SchemaMessageOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return Whether the data field is set. + */ + boolean hasData(); + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + * + * @return The data. + */ + com.google.cloud.geminidataanalytics.v1.DataMessage getData(); + + /** + * + * + *
+   * A message produced during data retrieval.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.DataMessage data = 3; + */ + com.google.cloud.geminidataanalytics.v1.DataMessageOrBuilder getDataOrBuilder(); + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return Whether the analysis field is set. + */ + boolean hasAnalysis(); + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + * + * @return The analysis. + */ + com.google.cloud.geminidataanalytics.v1.AnalysisMessage getAnalysis(); + + /** + * + * + *
+   * A message produced during analysis.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.AnalysisMessage analysis = 4; + */ + com.google.cloud.geminidataanalytics.v1.AnalysisMessageOrBuilder getAnalysisOrBuilder(); + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return Whether the chart field is set. + */ + boolean hasChart(); + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + * + * @return The chart. + */ + com.google.cloud.geminidataanalytics.v1.ChartMessage getChart(); + + /** + * + * + *
+   * A message produced during chart generation.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ChartMessage chart = 5; + */ + com.google.cloud.geminidataanalytics.v1.ChartMessageOrBuilder getChartOrBuilder(); + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + * + * @return The error. + */ + com.google.cloud.geminidataanalytics.v1.ErrorMessage getError(); + + /** + * + * + *
+   * An error message.
+   * 
+ * + * .google.cloud.geminidataanalytics.v1.ErrorMessage error = 6; + */ + com.google.cloud.geminidataanalytics.v1.ErrorMessageOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exampleQueries field is set. + */ + boolean hasExampleQueries(); + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exampleQueries. + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueries getExampleQueries(); + + /** + * + * + *
+   * Optional. A message containing example queries.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.geminidataanalytics.v1.ExampleQueriesOrBuilder getExampleQueriesOrBuilder(); + + /** + * + * + *
+   * Identifies the group that the event belongs to. Similar events are deemed
+   * to be logically relevant to each other and should be shown together in
+   * the UI.
+   * 
+ * + * optional int32 group_id = 12; + * + * @return Whether the groupId field is set. + */ + boolean hasGroupId(); + + /** + * + * + *
+   * Identifies the group that the event belongs to. Similar events are deemed
+   * to be logically relevant to each other and should be shown together in
+   * the UI.
+   * 
+ * + * optional int32 group_id = 12; + * + * @return The groupId. + */ + int getGroupId(); + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the citation field is set. + */ + boolean hasCitation(); + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The citation. + */ + com.google.cloud.geminidataanalytics.v1.Citation getCitation(); + + /** + * + * + *
+   * Output only. Citation information for the system message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.Citation citation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.geminidataanalytics.v1.CitationOrBuilder getCitationOrBuilder(); + + com.google.cloud.geminidataanalytics.v1.SystemMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessage.java new file mode 100644 index 000000000000..90d3872c4e30 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessage.java @@ -0,0 +1,1205 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A multi-part text message.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.TextMessage} + */ +@com.google.protobuf.Generated +public final class TextMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.TextMessage) + TextMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextMessage"); + } + + // Use TextMessage.newBuilder() to construct. + private TextMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TextMessage() { + parts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + textType_ = 0; + thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_TextMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_TextMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.TextMessage.class, + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder.class); + } + + /** + * + * + *
+   * The type of the text message.
+   * 
+ * + * Protobuf enum {@code google.cloud.geminidataanalytics.v1.TextMessage.TextType} + */ + public enum TextType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default text type.
+     * 
+ * + * TEXT_TYPE_UNSPECIFIED = 0; + */ + TEXT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The text is a final response to the user question.
+     * 
+ * + * FINAL_RESPONSE = 1; + */ + FINAL_RESPONSE(1), + /** + * + * + *
+     * The text is a thought from the model.
+     * 
+ * + * THOUGHT = 2; + */ + THOUGHT(2), + /** + * + * + *
+     * The text is an informational message about the agent's progress, such as
+     * a tool being invoked. This is distinct from the agent's internal thought
+     * process (`THOUGHT`) and the final answer to the user
+     * (`FINAL_RESPONSE`). These messages provide insight into the agent's
+     * actions.
+     * 
+ * + * PROGRESS = 3; + */ + PROGRESS(3), + /** + * + * + *
+     * The text is a list of follow-up questions suggested.
+     * Each item in parts is a follow-up question.
+     * 
+ * + * FOLLOWUP_QUESTIONS = 4; + */ + FOLLOWUP_QUESTIONS(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextType"); + } + + /** + * + * + *
+     * The default text type.
+     * 
+ * + * TEXT_TYPE_UNSPECIFIED = 0; + */ + public static final int TEXT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The text is a final response to the user question.
+     * 
+ * + * FINAL_RESPONSE = 1; + */ + public static final int FINAL_RESPONSE_VALUE = 1; + + /** + * + * + *
+     * The text is a thought from the model.
+     * 
+ * + * THOUGHT = 2; + */ + public static final int THOUGHT_VALUE = 2; + + /** + * + * + *
+     * The text is an informational message about the agent's progress, such as
+     * a tool being invoked. This is distinct from the agent's internal thought
+     * process (`THOUGHT`) and the final answer to the user
+     * (`FINAL_RESPONSE`). These messages provide insight into the agent's
+     * actions.
+     * 
+ * + * PROGRESS = 3; + */ + public static final int PROGRESS_VALUE = 3; + + /** + * + * + *
+     * The text is a list of follow-up questions suggested.
+     * Each item in parts is a follow-up question.
+     * 
+ * + * FOLLOWUP_QUESTIONS = 4; + */ + public static final int FOLLOWUP_QUESTIONS_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 TextType 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 TextType forNumber(int value) { + switch (value) { + case 0: + return TEXT_TYPE_UNSPECIFIED; + case 1: + return FINAL_RESPONSE; + case 2: + return THOUGHT; + case 3: + return PROGRESS; + case 4: + return FOLLOWUP_QUESTIONS; + 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 TextType findValueByNumber(int number) { + return TextType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TextType[] VALUES = values(); + + public static TextType 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 TextType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.geminidataanalytics.v1.TextMessage.TextType) + } + + public static final int PARTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList parts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the parts. + */ + public com.google.protobuf.ProtocolStringList getPartsList() { + return parts_; + } + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of parts. + */ + public int getPartsCount() { + return parts_.size(); + } + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The parts at the given index. + */ + public java.lang.String getParts(int index) { + return parts_.get(index); + } + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the parts at the given index. + */ + public com.google.protobuf.ByteString getPartsBytes(int index) { + return parts_.getByteString(index); + } + + public static final int TEXT_TYPE_FIELD_NUMBER = 2; + private int textType_ = 0; + + /** + * + * + *
+   * Optional. The type of the text message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for textType. + */ + @java.lang.Override + public int getTextTypeValue() { + return textType_; + } + + /** + * + * + *
+   * Optional. The type of the text message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textType. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage.TextType getTextType() { + com.google.cloud.geminidataanalytics.v1.TextMessage.TextType result = + com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.forNumber(textType_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.UNRECOGNIZED + : result; + } + + public static final int THOUGHT_SIGNATURE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * Optional. An opaque signature for a thought so it can be reused in
+   * subsequent requests.
+   * 
+ * + * bytes thought_signature = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thoughtSignature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThoughtSignature() { + return thoughtSignature_; + } + + 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 < parts_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parts_.getRaw(i)); + } + if (textType_ + != com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.TEXT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, textType_); + } + if (!thoughtSignature_.isEmpty()) { + output.writeBytes(3, thoughtSignature_); + } + getUnknownFields().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 < parts_.size(); i++) { + dataSize += computeStringSizeNoTag(parts_.getRaw(i)); + } + size += dataSize; + size += 1 * getPartsList().size(); + } + if (textType_ + != com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.TEXT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, textType_); + } + if (!thoughtSignature_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, thoughtSignature_); + } + size += getUnknownFields().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.geminidataanalytics.v1.TextMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.TextMessage other = + (com.google.cloud.geminidataanalytics.v1.TextMessage) obj; + + if (!getPartsList().equals(other.getPartsList())) return false; + if (textType_ != other.textType_) return false; + if (!getThoughtSignature().equals(other.getThoughtSignature())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPartsCount() > 0) { + hash = (37 * hash) + PARTS_FIELD_NUMBER; + hash = (53 * hash) + getPartsList().hashCode(); + } + hash = (37 * hash) + TEXT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + textType_; + hash = (37 * hash) + THOUGHT_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getThoughtSignature().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage 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.geminidataanalytics.v1.TextMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage 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.geminidataanalytics.v1.TextMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.TextMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A multi-part text message.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.TextMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.TextMessage) + com.google.cloud.geminidataanalytics.v1.TextMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_TextMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_TextMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.TextMessage.class, + com.google.cloud.geminidataanalytics.v1.TextMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.TextMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + textType_ = 0; + thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_TextMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage build() { + com.google.cloud.geminidataanalytics.v1.TextMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.TextMessage result = + new com.google.cloud.geminidataanalytics.v1.TextMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.TextMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + parts_.makeImmutable(); + result.parts_ = parts_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.textType_ = textType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.thoughtSignature_ = thoughtSignature_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.TextMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.TextMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.TextMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.TextMessage.getDefaultInstance()) + return this; + if (!other.parts_.isEmpty()) { + if (parts_.isEmpty()) { + parts_ = other.parts_; + bitField0_ |= 0x00000001; + } else { + ensurePartsIsMutable(); + parts_.addAll(other.parts_); + } + onChanged(); + } + if (other.textType_ != 0) { + setTextTypeValue(other.getTextTypeValue()); + } + if (!other.getThoughtSignature().isEmpty()) { + setThoughtSignature(other.getThoughtSignature()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + ensurePartsIsMutable(); + parts_.add(s); + break; + } // case 10 + case 16: + { + textType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + thoughtSignature_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList parts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePartsIsMutable() { + if (!parts_.isModifiable()) { + parts_ = new com.google.protobuf.LazyStringArrayList(parts_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the parts. + */ + public com.google.protobuf.ProtocolStringList getPartsList() { + parts_.makeImmutable(); + return parts_; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of parts. + */ + public int getPartsCount() { + return parts_.size(); + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The parts at the given index. + */ + public java.lang.String getParts(int index) { + return parts_.get(index); + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the parts at the given index. + */ + public com.google.protobuf.ByteString getPartsBytes(int index) { + return parts_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The parts to set. + * @return This builder for chaining. + */ + public Builder setParts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartsIsMutable(); + parts_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The parts to add. + * @return This builder for chaining. + */ + public Builder addParts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartsIsMutable(); + parts_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The parts to add. + * @return This builder for chaining. + */ + public Builder addAllParts(java.lang.Iterable values) { + ensurePartsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parts_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearParts() { + parts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parts of the message.
+     * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the parts to add. + * @return This builder for chaining. + */ + public Builder addPartsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePartsIsMutable(); + parts_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int textType_ = 0; + + /** + * + * + *
+     * Optional. The type of the text message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for textType. + */ + @java.lang.Override + public int getTextTypeValue() { + return textType_; + } + + /** + * + * + *
+     * Optional. The type of the text message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for textType to set. + * @return This builder for chaining. + */ + public Builder setTextTypeValue(int value) { + textType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the text message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textType. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.TextMessage.TextType getTextType() { + com.google.cloud.geminidataanalytics.v1.TextMessage.TextType result = + com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.forNumber(textType_); + return result == null + ? com.google.cloud.geminidataanalytics.v1.TextMessage.TextType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The type of the text message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The textType to set. + * @return This builder for chaining. + */ + public Builder setTextType(com.google.cloud.geminidataanalytics.v1.TextMessage.TextType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + textType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the text message.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTextType() { + bitField0_ = (bitField0_ & ~0x00000002); + textType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Optional. An opaque signature for a thought so it can be reused in
+     * subsequent requests.
+     * 
+ * + * bytes thought_signature = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thoughtSignature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThoughtSignature() { + return thoughtSignature_; + } + + /** + * + * + *
+     * Optional. An opaque signature for a thought so it can be reused in
+     * subsequent requests.
+     * 
+ * + * bytes thought_signature = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The thoughtSignature to set. + * @return This builder for chaining. + */ + public Builder setThoughtSignature(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + thoughtSignature_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An opaque signature for a thought so it can be reused in
+     * subsequent requests.
+     * 
+ * + * bytes thought_signature = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearThoughtSignature() { + bitField0_ = (bitField0_ & ~0x00000004); + thoughtSignature_ = getDefaultInstance().getThoughtSignature(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.TextMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.TextMessage) + private static final com.google.cloud.geminidataanalytics.v1.TextMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.TextMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.TextMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.TextMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessageOrBuilder.java new file mode 100644 index 000000000000..3b2a3fe81a71 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/TextMessageOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface TextMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.TextMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the parts. + */ + java.util.List getPartsList(); + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of parts. + */ + int getPartsCount(); + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The parts at the given index. + */ + java.lang.String getParts(int index); + + /** + * + * + *
+   * Optional. The parts of the message.
+   * 
+ * + * repeated string parts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the parts at the given index. + */ + com.google.protobuf.ByteString getPartsBytes(int index); + + /** + * + * + *
+   * Optional. The type of the text message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for textType. + */ + int getTextTypeValue(); + + /** + * + * + *
+   * Optional. The type of the text message.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.TextMessage.TextType text_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textType. + */ + com.google.cloud.geminidataanalytics.v1.TextMessage.TextType getTextType(); + + /** + * + * + *
+   * Optional. An opaque signature for a thought so it can be reused in
+   * subsequent requests.
+   * 
+ * + * bytes thought_signature = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thoughtSignature. + */ + com.google.protobuf.ByteString getThoughtSignature(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequest.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequest.java new file mode 100644 index 000000000000..d8c4d2de9ee1 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequest.java @@ -0,0 +1,1380 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * Message for updating a DataAgent.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest} + */ +@com.google.protobuf.Generated +public final class UpdateDataAgentRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) + UpdateDataAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDataAgentRequest"); + } + + // Use UpdateDataAgentRequest.newBuilder() to construct. + private UpdateDataAgentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateDataAgentRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int DATA_AGENT_FIELD_NUMBER = 2; + private com.google.cloud.geminidataanalytics.v1.DataAgent dataAgent_; + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + @java.lang.Override + public boolean hasDataAgent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent() { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder() { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDataAgent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataAgent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + size += getUnknownFields().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.geminidataanalytics.v1.UpdateDataAgentRequest)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest other = + (com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDataAgent() != other.hasDataAgent()) return false; + if (hasDataAgent()) { + if (!getDataAgent().equals(other.getDataAgent())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDataAgent()) { + hash = (37 * hash) + DATA_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getDataAgent().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest 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.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest 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.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.UpdateDataAgentRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a DataAgent.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.class, + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetDataAgentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + dataAgent_ = null; + if (dataAgentBuilder_ != null) { + dataAgentBuilder_.dispose(); + dataAgentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataAgentServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UpdateDataAgentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest + getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest build() { + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest buildPartial() { + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest result = + new com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAgent_ = dataAgentBuilder_ == null ? dataAgent_ : dataAgentBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest other) { + if (other + == com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDataAgent()) { + mergeDataAgent(other.getDataAgent()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDataAgentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * DataAgent resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields with non-default values
+     * present in the request will be overwritten. If a wildcard mask is provided,
+     * all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.geminidataanalytics.v1.DataAgent dataAgent_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + dataAgentBuilder_; + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + public boolean hasDataAgent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent() { + if (dataAgentBuilder_ == null) { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } else { + return dataAgentBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgent(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAgent_ = value; + } else { + dataAgentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAgent( + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder builderForValue) { + if (dataAgentBuilder_ == null) { + dataAgent_ = builderForValue.build(); + } else { + dataAgentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAgent(com.google.cloud.geminidataanalytics.v1.DataAgent value) { + if (dataAgentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataAgent_ != null + && dataAgent_ + != com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance()) { + getDataAgentBuilder().mergeFrom(value); + } else { + dataAgent_ = value; + } + } else { + dataAgentBuilder_.mergeFrom(value); + } + if (dataAgent_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAgent() { + bitField0_ = (bitField0_ & ~0x00000002); + dataAgent_ = null; + if (dataAgentBuilder_ != null) { + dataAgentBuilder_.dispose(); + dataAgentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgent.Builder getDataAgentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDataAgentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder() { + if (dataAgentBuilder_ != null) { + return dataAgentBuilder_.getMessageOrBuilder(); + } else { + return dataAgent_ == null + ? com.google.cloud.geminidataanalytics.v1.DataAgent.getDefaultInstance() + : dataAgent_; + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder> + internalGetDataAgentFieldBuilder() { + if (dataAgentBuilder_ == null) { + dataAgentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.geminidataanalytics.v1.DataAgent, + com.google.cloud.geminidataanalytics.v1.DataAgent.Builder, + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder>( + getDataAgent(), getParentForChildren(), isClean()); + dataAgent_ = null; + } + return dataAgentBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) + private static final com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest(); + } + + public static com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.UpdateDataAgentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequestOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequestOrBuilder.java new file mode 100644 index 000000000000..8021d7afcbda --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UpdateDataAgentRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface UpdateDataAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * DataAgent resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields with non-default values
+   * present in the request will be overwritten. If a wildcard mask is provided,
+   * all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAgent field is set. + */ + boolean hasDataAgent(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAgent. + */ + com.google.cloud.geminidataanalytics.v1.DataAgent getDataAgent(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.geminidataanalytics.v1.DataAgent data_agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.geminidataanalytics.v1.DataAgentOrBuilder getDataAgentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctions.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctions.java new file mode 100644 index 000000000000..359332924a1c --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctions.java @@ -0,0 +1,940 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A collection of user functions to be included in context.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UserFunctions} + */ +@com.google.protobuf.Generated +public final class UserFunctions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.UserFunctions) + UserFunctionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserFunctions"); + } + + // Use UserFunctions.newBuilder() to construct. + private UserFunctions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserFunctions() { + bqRoutines_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UserFunctions.class, + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder.class); + } + + public static final int BQ_ROUTINES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bqRoutines_; + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + @java.lang.Override + public java.util.List + getBqRoutinesList() { + return bqRoutines_; + } + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + @java.lang.Override + public java.util.List + getBqRoutinesOrBuilderList() { + return bqRoutines_; + } + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + @java.lang.Override + public int getBqRoutinesCount() { + return bqRoutines_.size(); + } + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine getBqRoutines(int index) { + return bqRoutines_.get(index); + } + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder getBqRoutinesOrBuilder( + int index) { + return bqRoutines_.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 < bqRoutines_.size(); i++) { + output.writeMessage(1, bqRoutines_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bqRoutines_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bqRoutines_.get(i)); + } + size += getUnknownFields().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.geminidataanalytics.v1.UserFunctions)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.UserFunctions other = + (com.google.cloud.geminidataanalytics.v1.UserFunctions) obj; + + if (!getBqRoutinesList().equals(other.getBqRoutinesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBqRoutinesCount() > 0) { + hash = (37 * hash) + BQ_ROUTINES_FIELD_NUMBER; + hash = (53 * hash) + getBqRoutinesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions 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.geminidataanalytics.v1.UserFunctions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions 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.geminidataanalytics.v1.UserFunctions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.UserFunctions 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of user functions to be included in context.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UserFunctions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.UserFunctions) + com.google.cloud.geminidataanalytics.v1.UserFunctionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UserFunctions.class, + com.google.cloud.geminidataanalytics.v1.UserFunctions.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.UserFunctions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bqRoutinesBuilder_ == null) { + bqRoutines_ = java.util.Collections.emptyList(); + } else { + bqRoutines_ = null; + bqRoutinesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.ContextProto + .internal_static_google_cloud_geminidataanalytics_v1_UserFunctions_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserFunctions getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserFunctions build() { + com.google.cloud.geminidataanalytics.v1.UserFunctions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserFunctions buildPartial() { + com.google.cloud.geminidataanalytics.v1.UserFunctions result = + new com.google.cloud.geminidataanalytics.v1.UserFunctions(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.geminidataanalytics.v1.UserFunctions result) { + if (bqRoutinesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bqRoutines_ = java.util.Collections.unmodifiableList(bqRoutines_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bqRoutines_ = bqRoutines_; + } else { + result.bqRoutines_ = bqRoutinesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.UserFunctions result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.UserFunctions) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.UserFunctions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.UserFunctions other) { + if (other == com.google.cloud.geminidataanalytics.v1.UserFunctions.getDefaultInstance()) + return this; + if (bqRoutinesBuilder_ == null) { + if (!other.bqRoutines_.isEmpty()) { + if (bqRoutines_.isEmpty()) { + bqRoutines_ = other.bqRoutines_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBqRoutinesIsMutable(); + bqRoutines_.addAll(other.bqRoutines_); + } + onChanged(); + } + } else { + if (!other.bqRoutines_.isEmpty()) { + if (bqRoutinesBuilder_.isEmpty()) { + bqRoutinesBuilder_.dispose(); + bqRoutinesBuilder_ = null; + bqRoutines_ = other.bqRoutines_; + bitField0_ = (bitField0_ & ~0x00000001); + bqRoutinesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBqRoutinesFieldBuilder() + : null; + } else { + bqRoutinesBuilder_.addAllMessages(other.bqRoutines_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine m = + input.readMessage( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.parser(), + extensionRegistry); + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + bqRoutines_.add(m); + } else { + bqRoutinesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List bqRoutines_ = + java.util.Collections.emptyList(); + + private void ensureBqRoutinesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bqRoutines_ = + new java.util.ArrayList( + bqRoutines_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder> + bqRoutinesBuilder_; + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public java.util.List + getBqRoutinesList() { + if (bqRoutinesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bqRoutines_); + } else { + return bqRoutinesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public int getBqRoutinesCount() { + if (bqRoutinesBuilder_ == null) { + return bqRoutines_.size(); + } else { + return bqRoutinesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine getBqRoutines(int index) { + if (bqRoutinesBuilder_ == null) { + return bqRoutines_.get(index); + } else { + return bqRoutinesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder setBqRoutines( + int index, com.google.cloud.geminidataanalytics.v1.BigQueryRoutine value) { + if (bqRoutinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBqRoutinesIsMutable(); + bqRoutines_.set(index, value); + onChanged(); + } else { + bqRoutinesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder setBqRoutines( + int index, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder builderForValue) { + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + bqRoutines_.set(index, builderForValue.build()); + onChanged(); + } else { + bqRoutinesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder addBqRoutines(com.google.cloud.geminidataanalytics.v1.BigQueryRoutine value) { + if (bqRoutinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBqRoutinesIsMutable(); + bqRoutines_.add(value); + onChanged(); + } else { + bqRoutinesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder addBqRoutines( + int index, com.google.cloud.geminidataanalytics.v1.BigQueryRoutine value) { + if (bqRoutinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBqRoutinesIsMutable(); + bqRoutines_.add(index, value); + onChanged(); + } else { + bqRoutinesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder addBqRoutines( + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder builderForValue) { + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + bqRoutines_.add(builderForValue.build()); + onChanged(); + } else { + bqRoutinesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder addBqRoutines( + int index, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder builderForValue) { + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + bqRoutines_.add(index, builderForValue.build()); + onChanged(); + } else { + bqRoutinesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder addAllBqRoutines( + java.lang.Iterable + values) { + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bqRoutines_); + onChanged(); + } else { + bqRoutinesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder clearBqRoutines() { + if (bqRoutinesBuilder_ == null) { + bqRoutines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bqRoutinesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public Builder removeBqRoutines(int index) { + if (bqRoutinesBuilder_ == null) { + ensureBqRoutinesIsMutable(); + bqRoutines_.remove(index); + onChanged(); + } else { + bqRoutinesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder getBqRoutinesBuilder( + int index) { + return internalGetBqRoutinesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder getBqRoutinesOrBuilder( + int index) { + if (bqRoutinesBuilder_ == null) { + return bqRoutines_.get(index); + } else { + return bqRoutinesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public java.util.List< + ? extends com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder> + getBqRoutinesOrBuilderList() { + if (bqRoutinesBuilder_ != null) { + return bqRoutinesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bqRoutines_); + } + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder addBqRoutinesBuilder() { + return internalGetBqRoutinesFieldBuilder() + .addBuilder(com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder addBqRoutinesBuilder( + int index) { + return internalGetBqRoutinesFieldBuilder() + .addBuilder( + index, com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of BigQuery routines to include in the context.
+     * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + public java.util.List + getBqRoutinesBuilderList() { + return internalGetBqRoutinesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder> + internalGetBqRoutinesFieldBuilder() { + if (bqRoutinesBuilder_ == null) { + bqRoutinesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine.Builder, + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder>( + bqRoutines_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + bqRoutines_ = null; + } + return bqRoutinesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.UserFunctions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.UserFunctions) + private static final com.google.cloud.geminidataanalytics.v1.UserFunctions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.UserFunctions(); + } + + public static com.google.cloud.geminidataanalytics.v1.UserFunctions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserFunctions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.UserFunctions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctionsOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctionsOrBuilder.java new file mode 100644 index 000000000000..2c58e9ed5bb5 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserFunctionsOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface UserFunctionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.UserFunctions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + java.util.List getBqRoutinesList(); + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + com.google.cloud.geminidataanalytics.v1.BigQueryRoutine getBqRoutines(int index); + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + int getBqRoutinesCount(); + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + java.util.List + getBqRoutinesOrBuilderList(); + + /** + * + * + *
+   * A list of BigQuery routines to include in the context.
+   * 
+ * + * repeated .google.cloud.geminidataanalytics.v1.BigQueryRoutine bq_routines = 1; + */ + com.google.cloud.geminidataanalytics.v1.BigQueryRoutineOrBuilder getBqRoutinesOrBuilder( + int index); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessage.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessage.java new file mode 100644 index 000000000000..d27e577c2431 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessage.java @@ -0,0 +1,729 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +/** + * + * + *
+ * A message from the user that is interacting with the system.
+ * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UserMessage} + */ +@com.google.protobuf.Generated +public final class UserMessage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.geminidataanalytics.v1.UserMessage) + UserMessageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserMessage"); + } + + // Use UserMessage.newBuilder() to construct. + private UserMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserMessage() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UserMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UserMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UserMessage.class, + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + 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 TEXT; + 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 TEXT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return kindCase_ == 1; + } + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + 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 (kindCase_ == 1) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 1) { + kind_ = 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 (kindCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); + } + getUnknownFields().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.GeneratedMessage.computeStringSize(1, kind_); + } + size += getUnknownFields().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.geminidataanalytics.v1.UserMessage)) { + return super.equals(obj); + } + com.google.cloud.geminidataanalytics.v1.UserMessage other = + (com.google.cloud.geminidataanalytics.v1.UserMessage) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getText().equals(other.getText())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage 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.geminidataanalytics.v1.UserMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage 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.geminidataanalytics.v1.UserMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geminidataanalytics.v1.UserMessage 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A message from the user that is interacting with the system.
+   * 
+ * + * Protobuf type {@code google.cloud.geminidataanalytics.v1.UserMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.geminidataanalytics.v1.UserMessage) + com.google.cloud.geminidataanalytics.v1.UserMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UserMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UserMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.geminidataanalytics.v1.UserMessage.class, + com.google.cloud.geminidataanalytics.v1.UserMessage.Builder.class); + } + + // Construct using com.google.cloud.geminidataanalytics.v1.UserMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.geminidataanalytics.v1.DataChatServiceProto + .internal_static_google_cloud_geminidataanalytics_v1_UserMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessage getDefaultInstanceForType() { + return com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessage build() { + com.google.cloud.geminidataanalytics.v1.UserMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.geminidataanalytics.v1.UserMessage buildPartial() { + com.google.cloud.geminidataanalytics.v1.UserMessage result = + new com.google.cloud.geminidataanalytics.v1.UserMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.geminidataanalytics.v1.UserMessage result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.geminidataanalytics.v1.UserMessage result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.geminidataanalytics.v1.UserMessage) { + return mergeFrom((com.google.cloud.geminidataanalytics.v1.UserMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.geminidataanalytics.v1.UserMessage other) { + if (other == com.google.cloud.geminidataanalytics.v1.UserMessage.getDefaultInstance()) + return this; + switch (other.getKindCase()) { + case TEXT: + { + kindCase_ = 1; + kind_ = other.kind_; + onChanged(); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + kindCase_ = 1; + kind_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 1) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 1) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 1; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Text should use this field instead of blob.
+     * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 1; + kind_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.geminidataanalytics.v1.UserMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.geminidataanalytics.v1.UserMessage) + private static final com.google.cloud.geminidataanalytics.v1.UserMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.geminidataanalytics.v1.UserMessage(); + } + + public static com.google.cloud.geminidataanalytics.v1.UserMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.geminidataanalytics.v1.UserMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessageOrBuilder.java b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessageOrBuilder.java new file mode 100644 index 000000000000..7f582b980bba --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/java/com/google/cloud/geminidataanalytics/v1/UserMessageOrBuilder.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/geminidataanalytics/v1/data_chat_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.geminidataanalytics.v1; + +@com.google.protobuf.Generated +public interface UserMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.geminidataanalytics.v1.UserMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + boolean hasText(); + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+   * Text should use this field instead of blob.
+   * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + com.google.cloud.geminidataanalytics.v1.UserMessage.KindCase getKindCase(); +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/context.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/context.proto new file mode 100644 index 000000000000..bf89a2673ec2 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/context.proto @@ -0,0 +1,403 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1/datasource.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ContextProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// A collection of context to apply to this conversation +message Context { + // The relationship between two tables, including referencing and referenced + // columns. This is a derived context retrieved from Dataplex Dataset + // Insights. + message SchemaRelationship { + // Represents an ordered set of paths within the table schema. + message SchemaPaths { + // The service-qualified full resource name of the table + // Ex: + // bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string table_fqn = 1; + + // The ordered list of paths within the table schema. + repeated string paths = 2; + } + + // Source which generated the schema relation edge. + enum Source { + // The source of the schema relationship is unspecified. + SOURCE_UNSPECIFIED = 0; + + // The source of the schema relationship is BigQuery job history. + BIGQUERY_JOB_HISTORY = 1; + + // The source of the schema relationship is LLM suggested. + LLM_SUGGESTED = 2; + + // The source of the schema relationship is BigQuery table constraints. + BIGQUERY_TABLE_CONSTRAINTS = 3; + } + + // An ordered list of fields for the join from the first table. + // The size of this list must be the same as `right_schema_paths`. + // Each field at index i in this list must correspond to a field at the same + // index in the `right_schema_paths` list. + SchemaPaths left_schema_paths = 1; + + // An ordered list of fields for the join from the second table. + // The size of this list must be the same as `left_schema_paths`. + // Each field at index i in this list must correspond to a field at the same + // index in the `left_schema_paths` list. + SchemaPaths right_schema_paths = 2; + + // Optional. Sources which generated the schema relation edge. + repeated Source sources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A confidence score for the suggested relationship. + // Manually added edges have the highest confidence score. + float confidence_score = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The basic entry point for data owners creating domain knowledge + // for Agent. + // + // Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age + // is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) + // can help the model understand the business context around a user question. + string system_instruction = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Data sources that are available for answering the question. + DatasourceReferences datasource_references = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional options for the conversation. + ConversationOptions options = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of example queries, providing examples of relevant and + // commonly used SQL queries and their corresponding natural language queries + // optionally present. Currently only used for BigQuery data sources and + // databases (alloydb, cloudsql, spanner) data sources. + repeated ExampleQuery example_queries = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of golden queries, providing examples of relevant and + // commonly used Looker queries and their corresponding natural language + // queries optionally present. Only supported for Looker data sources. + repeated LookerGoldenQuery looker_golden_queries = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Term definitions (currently, only user authored) + // Not supported for databases (alloydb, cloudsql, spanner) data sources. + repeated GlossaryTerm glossary_terms = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Relationships between table schema, including referencing and + // referenced columns. + repeated SchemaRelationship schema_relationships = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A collection of user functions to be included in context. + UserFunctions user_functions = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// A collection of user functions to be included in context. +message UserFunctions { + // A list of BigQuery routines to include in the context. + repeated BigQueryRoutine bq_routines = 1; +} + +// A reference to a BigQuery routine. +message BigQueryRoutine { + // The reference to the BigQuery routine. + BigQueryRoutineReference routine_reference = 1; + + // User override or addition to description, to tell the agent when to use the + // UDF. + string description = 2; +} + +// A reference to a BigQuery routine. +message BigQueryRoutineReference { + // The project ID of the routine. + string project_id = 1; + + // The dataset ID of the routine. + string dataset_id = 2; + + // The routine ID of the routine. + string routine_id = 3; +} + +// Example of relevant and commonly used SQL query and its corresponding natural +// language queries optionally present. Currently only used for BigQuery data +// sources. +message ExampleQuery { + // The SQL or Looker query that should be generated to answer the natural + // language query. + oneof query { + // Optional. The SQL query that should be generated to answer the natural + // language question. For example: "SELECT COUNT(*) FROM orders WHERE + // order_date BETWEEN '2024-01-01' AND '2024-01-31'" + string sql_query = 101 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A natural language question that a user might ask. + // For example: "How many orders were placed last month?" + string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of query parameters. + // Example: The parameterized SQL query + // "SELECT * FROM my_table WHERE id = @id" can be matched with any value of + // id. + repeated QueryParameter parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A query parameter message represents a parameter that can be used to +// parameterize a SQL query. +message QueryParameter { + // Required. The name of the parameter reference in the SQL query. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the parameter that can be used by LLM to + // extract the parameter value from the user question. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data type of the parameter, e.g. "STRING", "INT64", "DATE", + // etc. For valid values, see the [BigQuery + // documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types). + // This will be used to populate + // google.cloud.bigquery.v2.QueryParameterType.type. + string data_type = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A matched query message represents the agent having matched one of the +// example queries supplied in context as being applicable to the current +// question. It will also contain additional info during the matching process. +message MatchedQuery { + // The query that was matched based on an example query. + ExampleQuery example_query = 1; + + // The extracted values for the query parameters. + repeated QueryParameterValues query_parameter_values = 2; +} + +// A query parameter values message represents the values for the query +// parameters that were extracted from the user question by LLM, based on the +// example query. +message QueryParameterValues { + // Required. The name of the parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of the parameter. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A golden query for Looker, including natural language questions and a +// corresponding Looker Query. Analogous to ExampleQuery. +message LookerGoldenQuery { + // Optional. Natural language questions that a user might ask. + // For example: "How many orders were placed last month?" + repeated string natural_language_questions = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Looker Query corresponding to the natural language questions. + LookerQuery looker_query = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Looker Query Object +// [Looker API +// documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). +message LookerQuery { + // A Looker query filter. + message Filter { + // Required. The field to filter on. + string field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The value for the field to filter on. + // Optional so we can preserve the default value as an empty + // string, important to get a valid and working Looker Explore url. + optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The LookML model used to generate the query. + string model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The LookML explore used to generate the query. + string explore = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to retrieve from the explore. + repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters to apply to the explore. + repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorts to apply to the explore. + repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limit in the query. + optional string limit = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The primary identifier for the query resource in Looker, used for + // API operations. Maps to `id` (or `slug`) in the Looker API `Query` + // resource. + optional string query_id = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The short alphanumeric identifier for the query, used for share + // links and Explore URLs (e.g., in the `qid` parameter). Maps to `client_id` + // in the Looker API `Query` resource. + optional string client_id = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Definition of a term within a specific domain. +message GlossaryTerm { + // Required. User friendly display name of the glossary term being defined. + // For example: "CTR", "conversion rate", "pending" + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The description or meaning of the term. + // For example: "Click-through rate", "The percentage of users who complete a + // desired action", "An order that is waiting to be processed." + string description = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of general purpose labels associated to this term. + // For example: ["click rate", "clickthrough", "waiting"] + repeated string labels = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for the conversation. +message ConversationOptions { + // Allowed models for the agent/conversation. + enum Model { + // No model specified. The model may be set on the chat request, or the + // default model will be used. Currently, this is + // `gemini-3.0-flash-preview`. + MODEL_UNSPECIFIED = 0; + + // Use the most up-to-date non-preview model. Currently, this is + // `gemini-2.5-flash`. This constrains the request level settings. The + // default will change to `gemini-2.5-flash`, and setting `thinking_mode` + // will not be supported. + LATEST_GA_MODEL = 1; + } + + // Optional. Options for analysis. + AnalysisOptions analysis = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Options for datasources. + DatasourceOptions datasource = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The model to use for the agent loop. + optional Model model = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for datasources configurations. +message DatasourceOptions { + // Optional. This option applies to datasources that require BigQuery queries + // only. Limits the bytes billed for each BQ query job. Queries that will have + // bytes billed beyond this limit will fail (without incurring a charge). + // If unspecified, no limit will be applied. + google.protobuf.Int64Value big_query_max_billed_bytes = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for analysis. +message AnalysisOptions { + // Options for Python analysis. + message Python { + // Optional. Whether to enable Python analysis. + // Defaults to false. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Options for Python analysis. + Python python = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Source attributions for content. +message Citation { + // Output only. List of the sources being cited. + repeated CitationSource sources = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of the anchors of the citations. + repeated CitationAnchor anchors = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The source of the citation. +message CitationSource { + // The source of the citation, which can be one of the supported types. + oneof source_type { + // Output only. The uri used as the source, such as a web grounding URL. + string uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The example query used as the source. + ExampleQuery example_query = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The glossary term used as the source. + GlossaryTerm glossary_term = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Unique identifier of the source. This ID is service-generated + // and is unique within the scope of a single `Citation` message. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The title of the source. + string title = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The anchor of the citation. +message CitationAnchor { + // Citation anchor within a TextMessage. + message TextMessageCitationAnchor { + // Output only. The 0-based index of the part within the TextMessage.parts + // field. + int32 part_index = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The offset, measured in UTF-8 bytes, within the part string + // where the citation begins (inclusive). Example: For the text "Hello, + // world" where "world" is cited, the start offset bytes (inclusive) is 7 + // and the end offset bytes (exclusive) is 12. + int32 start_offset_bytes = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The offset, measured in UTF-8 bytes, within the part string + // where the citation ends (exclusive). Example: For the text "Hello, world" + // where "world" is cited, the start offset bytes (inclusive) is 7 and the + // end offset bytes (exclusive) is 12. + int32 end_offset_bytes = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ids of the sources that are cited. + repeated string source_ids = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The anchor of the citation, which can be one of the supported types. + oneof anchor_type { + // Output only. Only set if the citation is for a TextMessage. + TextMessageCitationAnchor text_message_anchor = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/conversation.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/conversation.proto new file mode 100644 index 000000000000..4f536b7581c1 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/conversation.proto @@ -0,0 +1,190 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ConversationProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" + plural: "cryptoKeys" + singular: "cryptoKey" +}; + +// Message for a conversation. +message Conversation { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/Conversation" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}" + plural: "conversations" + singular: "conversation" + }; + + // Optional. Identifier. The unique resource name of a conversation. Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + // `{conversation_id}` is the resource id and should be 63 characters or less + // and must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: + // `projects/1234567890/locations/global/conversations/my-conversation`. + // + // It is recommended to skip setting this field during conversation creation + // as it will be inferred automatically and overwritten with the + // {parent}/conversations/{conversation_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Required. Agent(s) in the conversation. + // Currently, only one agent is supported. This field is repeated to allow + // for future support of multiple agents in a conversation. + // Format: `projects/{project}/locations/{location}/dataAgents/{agent}` + repeated string agents = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last used conversation. + google.protobuf.Timestamp last_used_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Open-ended and user-defined labels that can be set by the client + // to tag a conversation (e.g. to filter conversations for specific + // surfaces/products). + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Customer managed encryption key (CMEK) to use for encrypting the + // Conversation resources. Encryption will happen at Titan layer, we will pass + // the KMS key to Titan. + // + // Format: + // projects/{project_id}/locations/{location}/keyRings/{key_ring_name}/cryptoKeys/{key_name}. + optional string kms_key = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Optional. Whether memory is paused for this conversation. + optional bool memory_paused = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for creating a conversation. +message CreateConversationRequest { + // Required. Parent value for CreateConversationRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. The conversation id of the conversation to create. + // Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string conversation_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The conversation to create. + Conversation conversation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for getting a conversation based on parent and conversation id. +message GetConversationRequest { + // Required. Name of the resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; +} + +// Request for listing conversations based on parent. +message ListConversationsRequest { + // Required. Parent value for ListConversationsRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is `100`. All larger page sizes will be + // coerced to `100`. If unspecified, server will pick `50` as an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Returned conversations will match criteria specified within the + // filter. ListConversations allows filtering by: + // * agents + // * labels + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing conversations. +message ListConversationsResponse { + // The list of conversations. + repeated Conversation conversations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Request for deleting a conversation based on parent and conversation id. +message DeleteConversationRequest { + // Required. Name of the resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/credentials.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/credentials.proto new file mode 100644 index 000000000000..702b375a1f1a --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/credentials.proto @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "CredentialsProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// Represents different forms of credential specification. +message Credentials { + // The kind of credentials. + oneof kind { + // OAuth credentials. + OAuthCredentials oauth = 1; + } +} + +// Represents OAuth credentials. +message OAuthCredentials { + // The name of the secret containing the access token. + // Represents secret-based OAuth credentials. + message SecretBased { + // Required. An OAuth client ID. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. An OAuth client secret. + string client_secret = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Read more about Looker access tokens here: + // https://developers.looker.com/api/advanced-usage/looker-api-oauth + message TokenBased { + // Required. The name of the secret containing the access token. + string access_token = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The kind of OAuth credentials. + oneof kind { + // Secret-based OAuth credentials. + SecretBased secret = 2; + + // Token-based OAuth credentials. + TokenBased token = 3; + } +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent.proto new file mode 100644 index 000000000000..32dd046bf618 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent.proto @@ -0,0 +1,112 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1/data_analytics_agent.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// Message describing a DataAgent object. +message DataAgent { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + pattern: "projects/{project}/locations/{location}/dataAgents/{data_agent}" + plural: "dataAgents" + singular: "dataAgent" + }; + + // The type of the agent. Can be one of the following: + // * Data analytics agent. + // * Data engineering agent + oneof type { + // Data analytics agent. + DataAnalyticsAgent data_analytics_agent = 101; + } + + // Optional. Identifier. The unique resource name of a DataAgent. + // Format: + // `projects/{project}/locations/{location}/dataAgents/{data_agent_id}` + // `{data_agent}` is the resource id and should be 63 characters or less and + // must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: `projects/1234567890/locations/global/dataAgents/my-agent`. + // + // It is recommended to skip setting this field during agent creation as it + // will be inferred automatically and overwritten with the + // {parent}/dataAgents/{data_agent_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. User friendly display name. + // + // * Must be between 1-256 characters. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the agent. + // + // * Must be between 1-1024 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to help users filter related agents. + // For example, "sales", "business", "etl", and so on. + // Note labels are used only for filtering and not for policies. + // See the [labels + // documentation](https://cloud.google.com/resource-manager/docs/labels-overview) + // for more details on label usage. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the data agent was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the data agent was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] The time the data agent was soft deleted. + google.protobuf.Timestamp delete_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp in UTC of when this data agent is considered + // expired. This is *always* provided on output, regardless of what was sent + // on input. + google.protobuf.Timestamp purge_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Customer managed encryption key (CMEK) to use for encrypting the + // DataAgent resources. Cloud KMS CryptoKeys must reside in the same location + // as the DataAgent. The expected format is + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + optional string kms_key = 14 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent_service.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent_service.proto new file mode 100644 index 000000000000..1cc3f7473dd9 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_agent_service.proto @@ -0,0 +1,412 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1/data_agent.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// Service describing handlers for resources. +service DataAgentService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DataAgents in a given project and location. + rpc ListDataAgents(ListDataAgentsRequest) returns (ListDataAgentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataAgents" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists DataAgents that are accessible to the caller in a given project and + // location. + rpc ListAccessibleDataAgents(ListAccessibleDataAgentsRequest) + returns (ListAccessibleDataAgentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataAgents:listAccessible" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DataAgent. + rpc GetDataAgent(GetDataAgentRequest) returns (DataAgent) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DataAgent in a given project and location. + rpc CreateDataAgent(CreateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataAgents" + body: "data_agent" + }; + option (google.api.method_signature) = "parent,data_agent,data_agent_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new DataAgent in a given project and location synchronously. + rpc CreateDataAgentSync(CreateDataAgentRequest) returns (DataAgent) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataAgents:createSync" + body: "data_agent" + }; + option (google.api.method_signature) = "parent,data_agent,data_agent_id"; + } + + // Updates the parameters of a single DataAgent. + rpc UpdateDataAgent(UpdateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_agent.name=projects/*/locations/*/dataAgents/*}" + body: "data_agent" + }; + option (google.api.method_signature) = "data_agent,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DataAgent synchronously. + rpc UpdateDataAgentSync(UpdateDataAgentRequest) returns (DataAgent) { + option (google.api.http) = { + patch: "/v1/{data_agent.name=projects/*/locations/*/dataAgents/*}:updateSync" + body: "data_agent" + }; + option (google.api.method_signature) = "data_agent,update_mask"; + } + + // Deletes a single DataAgent. + rpc DeleteDataAgent(DeleteDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DataAgent synchronously. + rpc DeleteDataAgentSync(DeleteDataAgentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataAgents/*}:deleteSync" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the IAM policy for DataAgent + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the IAM policy for a DataAgent. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } +} + +// Message for requesting list of DataAgents. +message ListDataAgentsRequest { + // Required. Parent value for ListDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataAgents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataAgents` must + // match the call that provided the page token. The service may return fewer + // than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing DataAgents. +message ListDataAgentsResponse { + // The list of DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for requesting list of accessible DataAgents. +message ListAccessibleDataAgentsRequest { + // Filter for the creator of the agent. + enum CreatorFilter { + // Default value. + CREATOR_FILTER_UNSPECIFIED = 0; + + // No creator-specific filter will be applied. All agents will be returned. + NONE = 1; + + // Only agents created by the user calling the API will be returned. + CREATOR_ONLY = 2; + + // Only agents not created by the user calling the API will be returned. + NOT_CREATOR_ONLY = 3; + } + + // Required. Parent value for ListAccessibleDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAccessibleDataAgents` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAccessibleDataAgents` must match the call that provided the page + // token. The service may return fewer than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the creator of the agent. + CreatorFilter creator_filter = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing accessible DataAgents. +message ListAccessibleDataAgentsResponse { + // The list of accessible DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a DataAgent. +message GetDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; +} + +// Message for creating a DataAgent. +message CreateDataAgentRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Id of the requesting object. Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string data_agent_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being created. + DataAgent data_agent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a DataAgent. +message UpdateDataAgentRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // DataAgent resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields with non-default values + // present in the request will be overwritten. If a wildcard mask is provided, + // all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated. + DataAgent data_agent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a DataAgent. +message DeleteDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_analytics_agent.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_analytics_agent.proto new file mode 100644 index 000000000000..0a6ff978cdaf --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_analytics_agent.proto @@ -0,0 +1,46 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1/context.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAnalyticsAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// Message describing a DataAnalyticsAgent object. +message DataAnalyticsAgent { + // Optional. The staging context for the agent. + // This context is used to test and validate changes before publishing. + Context staging_context = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The published context for the agent. + // This context is used by the Chat API in production. + Context published_context = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The last published context for the agent. + // This is an output-only field populated by the system when the + // published context is updated. It is used to restore the agent to a + // previous state. + Context last_published_context = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_chat_service.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_chat_service.proto new file mode 100644 index 000000000000..205d822c3bab --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/data_chat_service.proto @@ -0,0 +1,682 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1/context.proto"; +import "google/cloud/geminidataanalytics/v1/conversation.proto"; +import "google/cloud/geminidataanalytics/v1/credentials.proto"; +import "google/cloud/geminidataanalytics/v1/datasource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataChatServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// Service to ask a natural language question on top of BigQuery +// and Looker Studio datasources to get back streamed responses of various kinds +// to help provide a rich conversational answer. +service DataChatService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Answers a data question by generating a stream of + // [Message][google.cloud.geminidataanalytics.v1.Message] objects. + rpc Chat(ChatRequest) returns (stream Message) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:chat" + body: "*" + }; + } + + // Creates a new conversation to persist the conversation history. Each + // conversation will have multiple messages associated with it. + rpc CreateConversation(CreateConversationRequest) returns (Conversation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversations" + body: "conversation" + }; + option (google.api.method_signature) = + "parent,conversation,conversation_id"; + } + + // Deletes a conversation. + rpc DeleteConversation(DeleteConversationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets details of a single conversation by using conversation id and parent. + rpc GetConversation(GetConversationRequest) returns (Conversation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all conversations for a given parent. + rpc ListConversations(ListConversationsRequest) + returns (ListConversationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/conversations" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all messages for a given conversation. + rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/conversations/*}/messages" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request for listing chat messages based on parent and conversation_id. +message ListMessagesRequest { + // Required. The conversation to list messages under. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is `100`. All larger page sizes will be + // coerced to `100`. If unspecified, server will pick `50` as an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + // + // ListMessages allows filtering by: + // * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + // * update_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing chat messages. +message ListMessagesResponse { + // The list of chat messages. + repeated StorageMessage messages = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// A stored message containing user message or system message. +message StorageMessage { + // The unique resource name of a chat message. + string message_id = 1; + + // The message content. + Message message = 2; +} + +// Request for Chat. +message ChatRequest { + // Mode of thinking for the agent. + enum ThinkingMode { + // Unspecified thinking mode, agent will use THINKING mode by default. + THINKING_MODE_UNSPECIFIED = 0; + + // Fast mode, answers quickly. + FAST = 1; + + // Thinking mode, solves complex problems. + THINKING = 2; + } + + // Model selection for the agent. + enum Model { + // No model specified. The default model will be used. Currently, this is + // `gemini-3.0-flash-preview`. + MODEL_UNSPECIFIED = 0; + + // Use the most up-to-date non-preview model. Currently, this is + // `gemini-2.5-flash`. This constrains the request level settings. The + // default will change to `gemini-2.5-flash`, and setting `thinking_mode` + // will not be supported. + LATEST_GA_MODEL = 1; + } + + // Context Provider for the chat request. + // It can either be - + // inline_context, which is a context provided inline in the request. + // data_agent, which is a reference to a data agent resource. + // conversation_reference, which is a reference to a persisted conversation + // and context using conversation_id and agent_id. + oneof context_provider { + // Optional. Inline context for the chat request. Use this to chat + // statelessly (without managed conversation persistence and without an + // Agent) by passing all context inline. + Context inline_context = 101 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reference to a persisted conversation and agent context. + // Use this to chat with an Agent using managed conversation persistence. + ConversationReference conversation_reference = 103 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Context for the chat request. Use this to chat with an Agent + // statelessly, without managed conversation persistence. + DataAgentContext data_agent_context = 104 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Context with client managed resources. + // Some clients may not use GDA managed resources including + // conversations and agents, instead they create and manage their own + // conversations and agents resources. + ClientManagedResourceContext client_managed_resource_context = 105 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional settings to customize request behavior, specific to the target + // datasource. + oneof datasource_settings { + // Optional. Looker specific settings. + LookerSettings looker_settings = 13 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The parent value for chat request. + // Pattern: `projects/{project}/locations/{location}` + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Content of current conversation. + repeated Message messages = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The credentials to use when calling the data source(s) specified + // in the context. + // + // This field can be used to provide credentials for various data sources. + // For example, when connecting to Looker, it currently supports both OAuth + // token and API key-based credentials, as described in + // [Authentication with an + // SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + Credentials credentials = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The thinking mode to use for the agent loop. + // Defaults to THINKING_MODE_UNSPECIFIED if not specified. + ThinkingMode thinking_mode = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The model to use for the agent loop when processing the request. + // This setting only has an effect when context.options.model is not set. + Model model = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Context for the chat request using a data agent. +message DataAgentContext { + // List of context versions supported by DCS. + // There are two versions of context. This is to maintain versioning for the + // data agent. + enum ContextVersion { + // Unspecified or unrecognized. + CONTEXT_VERSION_UNSPECIFIED = 0; + + // Using this version, DCS will use the latest staging context for the + // data agent. + STAGING = 1; + + // Using this version, DCS will use the latest published context for the + // data agent. + PUBLISHED = 2; + } + + // Required. The name of the data agent resource. + string data_agent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) + ContextVersion context_version = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Reference to a persisted conversation and agent context. +message ConversationReference { + // Required. Name of the conversation resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string conversation = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Required. Context for the chat request using a data agent. + DataAgentContext data_agent_context = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Context with client managed resources. +// Some clients may not use GDA managed resources including +// conversations and agents, instead they create and manage their own +// conversations and agents resources. +message ClientManagedResourceContext { + // Required. Context for the chat request. Use this to chat without GDA API + // managed conversation and agent persistence by passing all context inline. + Context inline_context = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The client managed conversation id. + string conversation_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The client managed agent id. + string agent_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message from an interaction between the user and the system. +message Message { + // The kind of message. + oneof kind { + // A message from the user that is interacting with the system. + UserMessage user_message = 2; + + // A message from the system in response to the user. + SystemMessage system_message = 3; + } + + // Output only. For user messages, this is the time at which the system + // received the message. For system messages, this is the time at which the + // system generated the message. + google.protobuf.Timestamp timestamp = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. unique id of the message in the conversation for persistence. + string message_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message to hold Looker specific custom settings. +message LookerSettings { + // Optional. Whether to operate in Looker's Development Mode. + // If true, the API session will be switched to the "dev" workspace, + // allowing interaction with LookML changes in the user's development branch. + // If false or unset, the session remains in the default state (Production + // Mode). + // See https://cloud.google.com/looker/docs/dev-mode-prod-mode. + bool enable_dev_mode = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message from the user that is interacting with the system. +message UserMessage { + // The kind of content in the user message. + oneof kind { + // Text should use this field instead of blob. + string text = 1; + } +} + +// A message from the system in response to the user. This message can also be a +// message from the user as historical context for multi-turn conversations with +// the system. +message SystemMessage { + // The kind of content in the system message. + oneof kind { + // A direct natural language response to the user message. + TextMessage text = 1; + + // A message produced during schema resolution. + SchemaMessage schema = 2; + + // A message produced during data retrieval. + DataMessage data = 3; + + // A message produced during analysis. + AnalysisMessage analysis = 4; + + // A message produced during chart generation. + ChartMessage chart = 5; + + // An error message. + ErrorMessage error = 6; + + // Optional. A message containing example queries. + ExampleQueries example_queries = 13 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifies the group that the event belongs to. Similar events are deemed + // to be logically relevant to each other and should be shown together in + // the UI. + optional int32 group_id = 12; + + // Output only. Citation information for the system message. + Citation citation = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A multi-part text message. +message TextMessage { + // The type of the text message. + enum TextType { + // The default text type. + TEXT_TYPE_UNSPECIFIED = 0; + + // The text is a final response to the user question. + FINAL_RESPONSE = 1; + + // The text is a thought from the model. + THOUGHT = 2; + + // The text is an informational message about the agent's progress, such as + // a tool being invoked. This is distinct from the agent's internal thought + // process (`THOUGHT`) and the final answer to the user + // (`FINAL_RESPONSE`). These messages provide insight into the agent's + // actions. + PROGRESS = 3; + + // The text is a list of follow-up questions suggested. + // Each item in parts is a follow-up question. + FOLLOWUP_QUESTIONS = 4; + } + + // Optional. The parts of the message. + repeated string parts = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the text message. + TextType text_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An opaque signature for a thought so it can be reused in + // subsequent requests. + bytes thought_signature = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during schema resolution. +message SchemaMessage { + // Whether this message contains the query or the result of the schema + // resolution. + oneof kind { + // A schema resolution query. + SchemaQuery query = 1; + + // The result of a schema resolution query. + SchemaResult result = 2; + } +} + +// A query for resolving the schema relevant to the posed question. +message SchemaQuery { + // Optional. The question to send to the system for schema resolution. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of schema resolution. +message SchemaResult { + // Optional. The datasources used to resolve the schema query. + repeated Datasource datasources = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during data retrieval. +message DataMessage { + // Whether this message contains the query, the result, or generated SQL for + // the data retrieval. + oneof kind { + // A data retrieval query. + DataQuery query = 1; + + // SQL generated by the system to retrieve data. + string generated_sql = 2; + + // Retrieved data. + DataResult result = 3; + + // A BigQuery job executed by the system to retrieve data. + BigQueryJob big_query_job = 5; + + // A pre-existing query that was matched to retrieve data. + MatchedQuery matched_query = 6; + } +} + +// A query for retrieving data. +message DataQuery { + // The type of query to execute. + oneof query_type { + // Optional. A query for retrieving data from a Looker explore. + LookerQuery looker = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A natural language question to answer. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A snake-case name for the query that reflects its intent. It is + // used to name the corresponding data result, so that it can be referenced in + // later steps. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The datasources available to answer the question. + repeated Datasource datasources = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Retrieved data. +message DataResult { + // Optional. A snake-case name for the data result that reflects its contents. + // The name is used to pass the result around by reference, and serves as a + // signal about its meaning. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the data. + Schema schema = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the data. Each row is a struct that matches the + // schema. Simple values are represented as strings, while nested structures + // are represented as lists or structs. + repeated google.protobuf.Struct data = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Formatted representation of the data, when applicable. + // Each row is a struct that directly corresponds to the row at the same index + // within the `data` field. Its values are string representations of the + // original data, formatted according to data source specifications (e.g., + // "$1,234.56" for currency). Columns without formatting will default to + // their raw value representation. If no columns have formatting rules, this + // field will be empty. + repeated google.protobuf.Struct formatted_data = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A BigQuery job executed by the system. +message BigQueryJob { + // Required. The project that the job belongs to. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The location of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string location = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A reference to the destination table of the job's query results. + // + // See + // [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery). + BigQueryTableReference destination_table = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the job's query results. + // + // See + // [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2). + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during analysis. +message AnalysisMessage { + // Whether this message contains the query or one of the events from the + // analysis. + oneof kind { + // An analysis query. + AnalysisQuery query = 1; + + // An event indicating the progress of the analysis. + AnalysisEvent progress_event = 2; + } +} + +// A query for performing an analysis. +message AnalysisQuery { + // Optional. An analysis question to help answer the user's original question. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The names of previously retrieved data results to analyze. + repeated string data_result_names = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An event indicating the progress of an analysis. +message AnalysisEvent { + // The kind of event that occurred during the analysis. + oneof kind { + // Python codegen planner's reasoning. + string planner_reasoning = 2; + + // Instructions issued for code generation. + string coder_instruction = 3; + + // Generated code. + string code = 4; + + // Output from code execution. + string execution_output = 5; + + // An error from code execution. + string execution_error = 6; + + // Result as Vega chart JSON string. + string result_vega_chart_json = 7; + + // Result as NL string. + string result_natural_language = 8; + + // Result as CSV string. + string result_csv_data = 9; + + // Result as a reference to a data source. + string result_reference_data = 10; + + // A generic error message. + string error = 11; + } +} + +// A message produced during chart generation. +message ChartMessage { + // Whether this message contains the query or the result of the chart + // generation. + oneof kind { + // A query for generating a chart. + ChartQuery query = 1; + + // The result of a chart generation query. + ChartResult result = 2; + } +} + +// A query for generating a chart. +message ChartQuery { + // Optional. Natural language instructions for generating the chart. + string instructions = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a previously retrieved data result to use in the + // chart. + string data_result_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of a chart generation query. +message ChartResult { + // Optional. A generated Vega chart config. + // See https://vega.github.io/vega/docs/config/ + google.protobuf.Struct vega_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A rendering of the chart if this was requested in the context. + Blob image = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// An error message from a tool call. +// This message is used to represent an error that occurred while an agent was +// trying to use a tool. It's important to note that not all errors are +// terminal. Many are recoverable, and the agent may use the information from +// this error message to self-correct and retry the tool call or try a +// different approach. +// +// For example, if a data query fails, the agent might receive an +// `ErrorMessage`, analyze it, and then generate a corrected query. +// +// Clients should be cautious about interpreting this message as a definitive +// failure. It can be part of the agent's normal, iterative process of +// completing a task. Surfacing these errors directly to end-users without +// context (e.g., as a "hard failure") may be misleading. +message ErrorMessage { + // Output only. The text of the error. + string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A message containing derived and authored example queries. +message ExampleQueries { + // Optional. A list of derived and authored example queries, providing + // examples of relevant and commonly used SQL queries and their corresponding + // natural language queries optionally present. Currently only used for + // BigQuery data sources. + repeated ExampleQuery example_queries = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A blob of data with a MIME type. +message Blob { + // Required. The IANA standard MIME type of the message data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The data represented as bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/datasource.proto b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/datasource.proto new file mode 100644 index 000000000000..270481f39638 --- /dev/null +++ b/java-geminidataanalytics/proto-google-cloud-geminidataanalytics-v1/src/main/proto/google/cloud/geminidataanalytics/v1/datasource.proto @@ -0,0 +1,262 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.geminidataanalytics.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DatasourceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1"; + +// The type of filter present on a datasource, such as ALWAYS_FILTER. +enum DataFilterType { + // The filter type was not specified. + DATA_FILTER_TYPE_UNSPECIFIED = 0; + + // A filter that the user configures, and any queries to the Explore will + // always apply this filter by default. Currently only used for Looker data + // sources. + ALWAYS_FILTER = 1; +} + +// A collection of references to datasources. +message DatasourceReferences { + // The datasources to use. + oneof references { + // References to BigQuery tables. + BigQueryTableReferences bq = 1; + + // References to Looker Studio datasources. + StudioDatasourceReferences studio = 2; + + // References to Looker Explores. + LookerExploreReferences looker = 3; + } +} + +// Message representing references to BigQuery tables and property graphs. +// At least one of `table_references`, `property_graph_references`, or +// `search_scope` must be populated. +message BigQueryTableReferences { + // Optional. References to BigQuery tables. + repeated BigQueryTableReference table_references = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a reference to a single BigQuery table. +message BigQueryTableReference { + // Required. The project that the table belongs to. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The dataset that the table belongs to. + string dataset_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table id. + string table_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing references to Looker Studio datasources. +message StudioDatasourceReferences { + // Optional. The references to the studio datasources. + repeated StudioDatasourceReference studio_references = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a reference to a single Looker Studio datasource. +message StudioDatasourceReference { + // Required. The id of the datasource. + string datasource_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing references to Looker explores. +message LookerExploreReferences { + // Required. References to Looker explores. + repeated LookerExploreReference explore_references = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing a reference to a single Looker explore. +message LookerExploreReference { + // The instance of the Looker explore. + oneof instance { + // Required. The base url of the Looker instance. + string looker_instance_uri = 9; + + // Private Looker instance info. + PrivateLookerInstanceInfo private_looker_instance_info = 10; + } + + // Required. Looker model, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML model. + string lookml_model = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Looker Explore, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML Explore. + string explore = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a reference to a single BigQuery property graph. +message BigQueryPropertyGraphReference { + // Required. The project that the property graph belongs to. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The dataset that the property graph belongs to. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The property graph id. + string property_graph_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing a private Looker instance info required if the Looker +// instance is behind a private network. +message PrivateLookerInstanceInfo { + // The Looker instance id. + string looker_instance_id = 1; + + // The service directory name of the Looker instance. + string service_directory_name = 2; +} + +// A datasource that can be used to answer questions. +message Datasource { + // The reference to the datasource. + oneof reference { + // A reference to a BigQuery table. + BigQueryTableReference bigquery_table_reference = 1; + + // A reference to a Looker Studio datasource. + string studio_datasource_id = 2; + + // A reference to a Looker explore. + LookerExploreReference looker_explore_reference = 4; + + // A reference to a BigQuery property graph. + BigQueryPropertyGraphReference bigquery_property_graph_reference = 16; + } + + // Optional. The schema of the datasource. + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A struct representation of the schema. + // This is populated for datasources with schemas that cannot be + // fully represented by the strongly-typed `schema` field. + // + // For Looker datasources, this maps to the LookmlModelExplore type: + // https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore + google.protobuf.Struct struct_schema = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The schema of a Datasource or QueryResult instance. +message Schema { + // Optional. The fields in the schema. + repeated Field fields = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A textual description of the table's content and purpose. + // For example: "Contains information about customer orders in our e-commerce + // store." Currently only used for BigQuery data sources. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to the table. For example: ["sales", "orders", "purchases"]. Currently only + // used for BigQuery data sources. + repeated string synonyms = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the table, used for + // categorization. For example: ["transaction", "revenue", "customer_data"]. + // Currently only used for BigQuery data sources. + repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Table display_name (same as label in + // cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not + // required, currently only Looker has this field. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters on the datasource's underlying data. Currently only + // used for Looker data sources. + repeated DataFilter filters = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A field in a schema. +message Field { + // Optional. The name of the field. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the field. + string type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A brief description of the field. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mode of the field (e.g., NULLABLE, REPEATED). + string mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to this field. For example: ["id", "customerid", "cust_id"]. Currently only + // used for BigQuery data sources. + repeated string synonyms = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the field, used for + // categorization. For example: ["identifier", "customer", "pii"]. Currently + // only used for BigQuery data sources. + repeated string tags = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field display_name (same as label in + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Recursive property for nested schema structures. + repeated Field subfields = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field category, not required, currently only useful for Looker. + string category = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Looker only. Value format of the field. + // Ref: + // https://cloud.google.com/looker/docs/reference/param-field-value-format + string value_format = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// A filter on a datasource's underlying data. Filter syntax documentation: +// https://cloud.google.com/looker/docs/filter-expressions +message DataFilter { + // Optional. The field to filter on. For example: ["event_date", + // "customer_id", "product_category"] + string field = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default value used for this filter if the filter is not + // overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"] + string value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of filter present on a datasource, such as + // ALWAYS_FILTER. + DataFilterType type = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetCredentialsProvider.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3580ef76b685 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceSettings; +import com.google.cloud.geminidataanalytics.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceSettings dataAgentServiceSettings = + DataAgentServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DataAgentServiceClient dataAgentServiceClient = + DataAgentServiceClient.create(dataAgentServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_Create_SetCredentialsProvider_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetEndpoint.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a64d0a3c2503 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_Create_SetEndpoint_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceSettings; +import com.google.cloud.geminidataanalytics.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceSettings dataAgentServiceSettings = + DataAgentServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DataAgentServiceClient dataAgentServiceClient = + DataAgentServiceClient.create(dataAgentServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_Create_SetEndpoint_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateUseHttpJsonTransport.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..bbc1dab689a3 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceSettings dataAgentServiceSettings = + DataAgentServiceSettings.newHttpJsonBuilder().build(); + DataAgentServiceClient dataAgentServiceClient = + DataAgentServiceClient.create(dataAgentServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_Create_UseHttpJsonTransport_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgent.java new file mode 100644 index 000000000000..0eb3ff447a93 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgent.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateDataAgent { + + public static void main(String[] args) throws Exception { + asyncCreateDataAgent(); + } + + public static void asyncCreateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAgentId("dataAgentId1752773622") + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.createDataAgentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgentLRO.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgentLRO.java new file mode 100644 index 000000000000..8e8839311e0f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/AsyncCreateDataAgentLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; + +public class AsyncCreateDataAgentLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDataAgentLRO(); + } + + public static void asyncCreateDataAgentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAgentId("dataAgentId1752773622") + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataAgentServiceClient.createDataAgentOperationCallable().futureCall(request); + // Do something. + DataAgent response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_LRO_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgent.java new file mode 100644 index 000000000000..77aa22518d20 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgent.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgent { + + public static void main(String[] args) throws Exception { + syncCreateDataAgent(); + } + + public static void syncCreateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAgentId("dataAgentId1752773622") + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + DataAgent response = dataAgentServiceClient.createDataAgentAsync(request).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentLocationnameDataagentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentLocationnameDataagentString.java new file mode 100644 index 000000000000..3b07444d5042 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentLocationnameDataagentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_LocationnameDataagentString_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgentLocationnameDataagentString { + + public static void main(String[] args) throws Exception { + syncCreateDataAgentLocationnameDataagentString(); + } + + public static void syncCreateDataAgentLocationnameDataagentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + DataAgent response = + dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_LocationnameDataagentString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentStringDataagentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentStringDataagentString.java new file mode 100644 index 000000000000..1019913ddfb9 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagent/SyncCreateDataAgentStringDataagentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_StringDataagentString_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgentStringDataagentString { + + public static void main(String[] args) throws Exception { + syncCreateDataAgentStringDataagentString(); + } + + public static void syncCreateDataAgentStringDataagentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + DataAgent response = + dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgent_StringDataagentString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/AsyncCreateDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/AsyncCreateDataAgentSync.java new file mode 100644 index 000000000000..50827a6866e8 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/AsyncCreateDataAgentSync.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class AsyncCreateDataAgentSync { + + public static void main(String[] args) throws Exception { + asyncCreateDataAgentSync(); + } + + public static void asyncCreateDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAgentId("dataAgentId1752773622") + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.createDataAgentSyncCallable().futureCall(request); + // Do something. + DataAgent response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSync.java new file mode 100644 index 000000000000..937c195506ae --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSync.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_sync] +import com.google.cloud.geminidataanalytics.v1.CreateDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgentSync { + + public static void main(String[] args) throws Exception { + syncCreateDataAgentSync(); + } + + public static void syncCreateDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + CreateDataAgentRequest request = + CreateDataAgentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAgentId("dataAgentId1752773622") + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + DataAgent response = dataAgentServiceClient.createDataAgentSync(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncLocationnameDataagentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncLocationnameDataagentString.java new file mode 100644 index 000000000000..7286e2cd18ce --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncLocationnameDataagentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_LocationnameDataagentString_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgentSyncLocationnameDataagentString { + + public static void main(String[] args) throws Exception { + syncCreateDataAgentSyncLocationnameDataagentString(); + } + + public static void syncCreateDataAgentSyncLocationnameDataagentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + DataAgent response = + dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_LocationnameDataagentString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncStringDataagentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncStringDataagentString.java new file mode 100644 index 000000000000..a4e2e0f0c47e --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/createdataagentsync/SyncCreateDataAgentSyncStringDataagentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_StringDataagentString_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateDataAgentSyncStringDataagentString { + + public static void main(String[] args) throws Exception { + syncCreateDataAgentSyncStringDataagentString(); + } + + public static void syncCreateDataAgentSyncStringDataagentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + DataAgent dataAgent = DataAgent.newBuilder().build(); + String dataAgentId = "dataAgentId1752773622"; + DataAgent response = + dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_CreateDataAgentSync_StringDataagentString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgent.java new file mode 100644 index 000000000000..24f9db36a8ee --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgent.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteDataAgent { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAgent(); + } + + public static void asyncDeleteDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.deleteDataAgentCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgentLRO.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgentLRO.java new file mode 100644 index 000000000000..6466236fefff --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/AsyncDeleteDataAgentLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteDataAgentLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAgentLRO(); + } + + public static void asyncDeleteDataAgentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataAgentServiceClient.deleteDataAgentOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_LRO_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgent.java new file mode 100644 index 000000000000..d9b9255b2802 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgent.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgent { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgent(); + } + + public static void syncDeleteDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setRequestId("requestId693933066") + .build(); + dataAgentServiceClient.deleteDataAgentAsync(request).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentDataagentname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentDataagentname.java new file mode 100644 index 000000000000..2645f339949f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentDataagentname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_Dataagentname_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgentDataagentname { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgentDataagentname(); + } + + public static void syncDeleteDataAgentDataagentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + dataAgentServiceClient.deleteDataAgentAsync(name).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_Dataagentname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentString.java new file mode 100644 index 000000000000..088029ab5671 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagent/SyncDeleteDataAgentString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_String_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgentString { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgentString(); + } + + public static void syncDeleteDataAgentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString(); + dataAgentServiceClient.deleteDataAgentAsync(name).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgent_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/AsyncDeleteDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/AsyncDeleteDataAgentSync.java new file mode 100644 index 000000000000..c6697a90fa64 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/AsyncDeleteDataAgentSync.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.protobuf.Empty; + +public class AsyncDeleteDataAgentSync { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAgentSync(); + } + + public static void asyncDeleteDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.deleteDataAgentSyncCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSync.java new file mode 100644 index 000000000000..1ff5659166d3 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSync.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteDataAgentRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgentSync { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgentSync(); + } + + public static void syncDeleteDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DeleteDataAgentRequest request = + DeleteDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setRequestId("requestId693933066") + .build(); + dataAgentServiceClient.deleteDataAgentSync(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncDataagentname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncDataagentname.java new file mode 100644 index 000000000000..87d77488e93a --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncDataagentname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_Dataagentname_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgentSyncDataagentname { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgentSyncDataagentname(); + } + + public static void syncDeleteDataAgentSyncDataagentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + dataAgentServiceClient.deleteDataAgentSync(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_Dataagentname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncString.java new file mode 100644 index 000000000000..b4e765fb01c6 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/deletedataagentsync/SyncDeleteDataAgentSyncString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_String_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAgentSyncString { + + public static void main(String[] args) throws Exception { + syncDeleteDataAgentSyncString(); + } + + public static void syncDeleteDataAgentSyncString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString(); + dataAgentServiceClient.deleteDataAgentSync(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_DeleteDataAgentSync_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/AsyncGetDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/AsyncGetDataAgent.java new file mode 100644 index 000000000000..e8b50847cf14 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/AsyncGetDataAgent.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; + +public class AsyncGetDataAgent { + + public static void main(String[] args) throws Exception { + asyncGetDataAgent(); + } + + public static void asyncGetDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetDataAgentRequest request = + GetDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .build(); + ApiFuture future = + dataAgentServiceClient.getDataAgentCallable().futureCall(request); + // Do something. + DataAgent response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgent.java new file mode 100644 index 000000000000..4917ea3792d0 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgent.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.GetDataAgentRequest; + +public class SyncGetDataAgent { + + public static void main(String[] args) throws Exception { + syncGetDataAgent(); + } + + public static void syncGetDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetDataAgentRequest request = + GetDataAgentRequest.newBuilder() + .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .build(); + DataAgent response = dataAgentServiceClient.getDataAgent(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentDataagentname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentDataagentname.java new file mode 100644 index 000000000000..8830d45551e6 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentDataagentname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_Dataagentname_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; + +public class SyncGetDataAgentDataagentname { + + public static void main(String[] args) throws Exception { + syncGetDataAgentDataagentname(); + } + + public static void syncGetDataAgentDataagentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + DataAgent response = dataAgentServiceClient.getDataAgent(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_Dataagentname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentString.java new file mode 100644 index 000000000000..20a2c1acb46b --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getdataagent/SyncGetDataAgentString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_String_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; + +public class SyncGetDataAgentString { + + public static void main(String[] args) throws Exception { + syncGetDataAgentString(); + } + + public static void syncGetDataAgentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString(); + DataAgent response = dataAgentServiceClient.getDataAgent(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetDataAgent_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/AsyncGetIamPolicy.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..859b36176938 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = dataAgentServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicy.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..ec4e09e1abd7 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataAgentServiceClient.getIamPolicy(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyResourcename.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyResourcename.java new file mode 100644 index 000000000000..ce60cc250262 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyResourcename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_Resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyResourcename(); + } + + public static void syncGetIamPolicyResourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + Policy response = dataAgentServiceClient.getIamPolicy(resource); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_Resourcename_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyString.java new file mode 100644 index 000000000000..f3ecb52e02a7 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getiampolicy/SyncGetIamPolicyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_String_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + public static void syncGetIamPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String resource = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString(); + Policy response = dataAgentServiceClient.getIamPolicy(resource); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetIamPolicy_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/AsyncGetLocation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..d8f31e4b52d6 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = dataAgentServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetLocation_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/SyncGetLocation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..4674da98e029 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_GetLocation_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataAgentServiceClient.getLocation(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_GetLocation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgents.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgents.java new file mode 100644 index 000000000000..10efaa331b8c --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgents.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class AsyncListAccessibleDataAgents { + + public static void main(String[] args) throws Exception { + asyncListAccessibleDataAgents(); + } + + public static void asyncListAccessibleDataAgents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListAccessibleDataAgentsRequest request = + ListAccessibleDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + ApiFuture future = + dataAgentServiceClient.listAccessibleDataAgentsPagedCallable().futureCall(request); + // Do something. + for (DataAgent element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgentsPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgentsPaged.java new file mode 100644 index 000000000000..dc29ea86dade --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/AsyncListAccessibleDataAgentsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_Paged_async] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAccessibleDataAgentsPaged { + + public static void main(String[] args) throws Exception { + asyncListAccessibleDataAgentsPaged(); + } + + public static void asyncListAccessibleDataAgentsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListAccessibleDataAgentsRequest request = + ListAccessibleDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + while (true) { + ListAccessibleDataAgentsResponse response = + dataAgentServiceClient.listAccessibleDataAgentsCallable().call(request); + for (DataAgent element : response.getDataAgentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgents.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgents.java new file mode 100644 index 000000000000..de922f56ce2d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgents.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListAccessibleDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListAccessibleDataAgents { + + public static void main(String[] args) throws Exception { + syncListAccessibleDataAgents(); + } + + public static void syncListAccessibleDataAgents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListAccessibleDataAgentsRequest request = + ListAccessibleDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + for (DataAgent element : + dataAgentServiceClient.listAccessibleDataAgents(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsLocationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsLocationname.java new file mode 100644 index 000000000000..9acdf7b63749 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_Locationname_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListAccessibleDataAgentsLocationname { + + public static void main(String[] args) throws Exception { + syncListAccessibleDataAgentsLocationname(); + } + + public static void syncListAccessibleDataAgentsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DataAgent element : + dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_Locationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsString.java new file mode 100644 index 000000000000..c5ed0cc9f5e3 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listaccessibledataagents/SyncListAccessibleDataAgentsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_String_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListAccessibleDataAgentsString { + + public static void main(String[] args) throws Exception { + syncListAccessibleDataAgentsString(); + } + + public static void syncListAccessibleDataAgentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DataAgent element : + dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListAccessibleDataAgents_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgents.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgents.java new file mode 100644 index 000000000000..8f6dbd65ec37 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgents.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class AsyncListDataAgents { + + public static void main(String[] args) throws Exception { + asyncListDataAgents(); + } + + public static void asyncListDataAgents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListDataAgentsRequest request = + ListDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + ApiFuture future = + dataAgentServiceClient.listDataAgentsPagedCallable().futureCall(request); + // Do something. + for (DataAgent element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgentsPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgentsPaged.java new file mode 100644 index 000000000000..a1397949e637 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/AsyncListDataAgentsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_Paged_async] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsResponse; +import com.google.cloud.geminidataanalytics.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDataAgentsPaged { + + public static void main(String[] args) throws Exception { + asyncListDataAgentsPaged(); + } + + public static void asyncListDataAgentsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListDataAgentsRequest request = + ListDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + while (true) { + ListDataAgentsResponse response = + dataAgentServiceClient.listDataAgentsCallable().call(request); + for (DataAgent element : response.getDataAgentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgents.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgents.java new file mode 100644 index 000000000000..d49ffe86f550 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgents.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListDataAgentsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListDataAgents { + + public static void main(String[] args) throws Exception { + syncListDataAgents(); + } + + public static void syncListDataAgents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListDataAgentsRequest request = + ListDataAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setShowDeleted(true) + .build(); + for (DataAgent element : dataAgentServiceClient.listDataAgents(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsLocationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsLocationname.java new file mode 100644 index 000000000000..60d39419f483 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_Locationname_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListDataAgentsLocationname { + + public static void main(String[] args) throws Exception { + syncListDataAgentsLocationname(); + } + + public static void syncListDataAgentsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_Locationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsString.java new file mode 100644 index 000000000000..88c020d78dd2 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listdataagents/SyncListDataAgentsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_String_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListDataAgentsString { + + public static void main(String[] args) throws Exception { + syncListDataAgentsString(); + } + + public static void syncListDataAgentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListDataAgents_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..ec26eb574f46 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataAgentServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListLocations_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocationsPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..535aea66226d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListLocations_Paged_async] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataAgentServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListLocations_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/SyncListLocations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..c309d96d8281 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_ListLocations_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataAgentServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_ListLocations_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/AsyncSetIamPolicy.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..fe10066b8d1f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = dataAgentServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicy.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..9b819bdfe6ce --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataAgentServiceClient.setIamPolicy(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyResourcename.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyResourcename.java new file mode 100644 index 000000000000..f8060a0ec014 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyResourcename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_Resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.geminidataanalytics.v1.DataAgentName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyResourcename(); + } + + public static void syncSetIamPolicyResourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]"); + Policy response = dataAgentServiceClient.setIamPolicy(resource); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_Resourcename_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyString.java new file mode 100644 index 000000000000..589ea7650d97 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/setiampolicy/SyncSetIamPolicyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_String_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyString(); + } + + public static void syncSetIamPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + String resource = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString(); + Policy response = dataAgentServiceClient.setIamPolicy(resource); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_SetIamPolicy_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgent.java new file mode 100644 index 000000000000..0cd9deee72f1 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgent.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAgent { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAgent(); + } + + public static void asyncUpdateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.updateDataAgentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgentLRO.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgentLRO.java new file mode 100644 index 000000000000..3733f54ae688 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/AsyncUpdateDataAgentLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.OperationMetadata; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAgentLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAgentLRO(); + } + + public static void asyncUpdateDataAgentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataAgentServiceClient.updateDataAgentOperationCallable().futureCall(request); + // Do something. + DataAgent response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_LRO_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgent.java new file mode 100644 index 000000000000..3b45ebd7d5de --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgent.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAgent { + + public static void main(String[] args) throws Exception { + syncUpdateDataAgent(); + } + + public static void syncUpdateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + DataAgent response = dataAgentServiceClient.updateDataAgentAsync(request).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgentDataagentFieldmask.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgentDataagentFieldmask.java new file mode 100644 index 000000000000..80e3c81d43df --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagent/SyncUpdateDataAgentDataagentFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_DataagentFieldmask_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAgentDataagentFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataAgentDataagentFieldmask(); + } + + public static void syncUpdateDataAgentDataagentFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataAgent response = dataAgentServiceClient.updateDataAgentAsync(dataAgent, updateMask).get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgent_DataagentFieldmask_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/AsyncUpdateDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/AsyncUpdateDataAgentSync.java new file mode 100644 index 000000000000..5da33a330472 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/AsyncUpdateDataAgentSync.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAgentSync { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAgentSync(); + } + + public static void asyncUpdateDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataAgentServiceClient.updateDataAgentSyncCallable().futureCall(request); + // Do something. + DataAgent response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSync.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSync.java new file mode 100644 index 000000000000..bb1385baf82f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSync.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.cloud.geminidataanalytics.v1.UpdateDataAgentRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAgentSync { + + public static void main(String[] args) throws Exception { + syncUpdateDataAgentSync(); + } + + public static void syncUpdateDataAgentSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + UpdateDataAgentRequest request = + UpdateDataAgentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAgent(DataAgent.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + DataAgent response = dataAgentServiceClient.updateDataAgentSync(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSyncDataagentFieldmask.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSyncDataagentFieldmask.java new file mode 100644 index 000000000000..5a35e154bfc7 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservice/updatedataagentsync/SyncUpdateDataAgentSyncDataagentFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_DataagentFieldmask_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgent; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAgentSyncDataagentFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataAgentSyncDataagentFieldmask(); + } + + public static void syncUpdateDataAgentSyncDataagentFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) { + DataAgent dataAgent = DataAgent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataAgent response = dataAgentServiceClient.updateDataAgentSync(dataAgent, updateMask); + } + } +} +// [END geminidataanalytics_v1_generated_DataAgentService_UpdateDataAgentSync_DataagentFieldmask_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/createdataagent/SyncCreateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/createdataagent/SyncCreateDataAgent.java new file mode 100644 index 000000000000..b0754931c7f9 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/createdataagent/SyncCreateDataAgent.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentServiceSettings_CreateDataAgent_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceSettings; +import java.time.Duration; + +public class SyncCreateDataAgent { + + public static void main(String[] args) throws Exception { + syncCreateDataAgent(); + } + + public static void syncCreateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceSettings.Builder dataAgentServiceSettingsBuilder = + DataAgentServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataAgentServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END geminidataanalytics_v1_generated_DataAgentServiceSettings_CreateDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/getdataagent/SyncGetDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/getdataagent/SyncGetDataAgent.java new file mode 100644 index 000000000000..494aadbaf39f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/dataagentservicesettings/getdataagent/SyncGetDataAgent.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataAgentServiceSettings_GetDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.DataAgentServiceSettings; +import java.time.Duration; + +public class SyncGetDataAgent { + + public static void main(String[] args) throws Exception { + syncGetDataAgent(); + } + + public static void syncGetDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceSettings.Builder dataAgentServiceSettingsBuilder = + DataAgentServiceSettings.newBuilder(); + dataAgentServiceSettingsBuilder + .getDataAgentSettings() + .setRetrySettings( + dataAgentServiceSettingsBuilder + .getDataAgentSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataAgentServiceSettings dataAgentServiceSettings = dataAgentServiceSettingsBuilder.build(); + } +} +// [END geminidataanalytics_v1_generated_DataAgentServiceSettings_GetDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/chat/AsyncChat.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/chat/AsyncChat.java new file mode 100644 index 000000000000..9d5b77946ebd --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/chat/AsyncChat.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_Chat_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.geminidataanalytics.v1.ChatRequest; +import com.google.cloud.geminidataanalytics.v1.Credentials; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.Message; +import java.util.ArrayList; + +public class AsyncChat { + + public static void main(String[] args) throws Exception { + asyncChat(); + } + + public static void asyncChat() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ChatRequest request = + ChatRequest.newBuilder() + .setParent("parent-995424086") + .addAllMessages(new ArrayList()) + .setCredentials(Credentials.newBuilder().build()) + .build(); + ServerStream stream = dataChatServiceClient.chatCallable().call(request); + for (Message response : stream) { + // Do something when a response is received. + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_Chat_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetCredentialsProvider.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..cb87ea189326 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings; +import com.google.cloud.geminidataanalytics.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataChatServiceSettings dataChatServiceSettings = + DataChatServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DataChatServiceClient dataChatServiceClient = + DataChatServiceClient.create(dataChatServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataChatService_Create_SetCredentialsProvider_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetEndpoint.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..bf77faf41757 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_Create_SetEndpoint_sync] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings; +import com.google.cloud.geminidataanalytics.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataChatServiceSettings dataChatServiceSettings = + DataChatServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DataChatServiceClient dataChatServiceClient = + DataChatServiceClient.create(dataChatServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataChatService_Create_SetEndpoint_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateUseHttpJsonTransport.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..3e40e43cd6a4 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataChatServiceSettings dataChatServiceSettings = + DataChatServiceSettings.newHttpJsonBuilder().build(); + DataChatServiceClient dataChatServiceClient = + DataChatServiceClient.create(dataChatServiceSettings); + } +} +// [END geminidataanalytics_v1_generated_DataChatService_Create_UseHttpJsonTransport_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/AsyncCreateConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/AsyncCreateConversation.java new file mode 100644 index 000000000000..57f4e268c705 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/AsyncCreateConversation.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_CreateConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class AsyncCreateConversation { + + public static void main(String[] args) throws Exception { + asyncCreateConversation(); + } + + public static void asyncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setConversationId("conversationId-1676095234") + .setConversation(Conversation.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataChatServiceClient.createConversationCallable().futureCall(request); + // Do something. + Conversation response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_CreateConversation_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversation.java new file mode 100644 index 000000000000..d7833e9d597d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_CreateConversation_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.CreateConversationRequest; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversation(); + } + + public static void syncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setConversationId("conversationId-1676095234") + .setConversation(Conversation.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Conversation response = dataChatServiceClient.createConversation(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_CreateConversation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationLocationnameConversationString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationLocationnameConversationString.java new file mode 100644 index 000000000000..720c31049f7d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationLocationnameConversationString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_CreateConversation_LocationnameConversationString_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateConversationLocationnameConversationString { + + public static void main(String[] args) throws Exception { + syncCreateConversationLocationnameConversationString(); + } + + public static void syncCreateConversationLocationnameConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + Conversation response = + dataChatServiceClient.createConversation(parent, conversation, conversationId); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_CreateConversation_LocationnameConversationString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationStringConversationString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationStringConversationString.java new file mode 100644 index 000000000000..56f826f3b08f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/createconversation/SyncCreateConversationStringConversationString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_CreateConversation_StringConversationString_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncCreateConversationStringConversationString { + + public static void main(String[] args) throws Exception { + syncCreateConversationStringConversationString(); + } + + public static void syncCreateConversationStringConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Conversation conversation = Conversation.newBuilder().build(); + String conversationId = "conversationId-1676095234"; + Conversation response = + dataChatServiceClient.createConversation(parent, conversation, conversationId); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_CreateConversation_StringConversationString_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/AsyncDeleteConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/AsyncDeleteConversation.java new file mode 100644 index 000000000000..3b5c85b10604 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/AsyncDeleteConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_DeleteConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.protobuf.Empty; + +public class AsyncDeleteConversation { + + public static void main(String[] args) throws Exception { + asyncDeleteConversation(); + } + + public static void asyncDeleteConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .build(); + ApiFuture future = + dataChatServiceClient.deleteConversationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_DeleteConversation_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversation.java new file mode 100644 index 000000000000..031ba8ad4964 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_DeleteConversation_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteConversation { + + public static void main(String[] args) throws Exception { + syncDeleteConversation(); + } + + public static void syncDeleteConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .build(); + dataChatServiceClient.deleteConversation(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_DeleteConversation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationConversationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationConversationname.java new file mode 100644 index 000000000000..8977f8c97586 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationConversationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_DeleteConversation_Conversationname_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConversationConversationname { + + public static void main(String[] args) throws Exception { + syncDeleteConversationConversationname(); + } + + public static void syncDeleteConversationConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + dataChatServiceClient.deleteConversation(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_DeleteConversation_Conversationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationString.java new file mode 100644 index 000000000000..28a09a568475 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/deleteconversation/SyncDeleteConversationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_DeleteConversation_String_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConversationString { + + public static void main(String[] args) throws Exception { + syncDeleteConversationString(); + } + + public static void syncDeleteConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString(); + dataChatServiceClient.deleteConversation(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_DeleteConversation_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/AsyncGetConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/AsyncGetConversation.java new file mode 100644 index 000000000000..3553387cb875 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/AsyncGetConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; + +public class AsyncGetConversation { + + public static void main(String[] args) throws Exception { + asyncGetConversation(); + } + + public static void asyncGetConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + GetConversationRequest request = + GetConversationRequest.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .build(); + ApiFuture future = + dataChatServiceClient.getConversationCallable().futureCall(request); + // Do something. + Conversation response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetConversation_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversation.java new file mode 100644 index 000000000000..20c04c61e1f4 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetConversation_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.GetConversationRequest; + +public class SyncGetConversation { + + public static void main(String[] args) throws Exception { + syncGetConversation(); + } + + public static void syncGetConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + GetConversationRequest request = + GetConversationRequest.newBuilder() + .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .build(); + Conversation response = dataChatServiceClient.getConversation(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetConversation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationConversationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationConversationname.java new file mode 100644 index 000000000000..3353a7bf53d9 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationConversationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetConversation_Conversationname_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; + +public class SyncGetConversationConversationname { + + public static void main(String[] args) throws Exception { + syncGetConversationConversationname(); + } + + public static void syncGetConversationConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + Conversation response = dataChatServiceClient.getConversation(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetConversation_Conversationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationString.java new file mode 100644 index 000000000000..065982c30a0c --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getconversation/SyncGetConversationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetConversation_String_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; + +public class SyncGetConversationString { + + public static void main(String[] args) throws Exception { + syncGetConversationString(); + } + + public static void syncGetConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString(); + Conversation response = dataChatServiceClient.getConversation(name); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetConversation_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/AsyncGetLocation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..f6784f87131c --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = dataChatServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetLocation_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/SyncGetLocation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..8eea1d0b7dc2 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_GetLocation_sync] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataChatServiceClient.getLocation(request); + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_GetLocation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversations.java new file mode 100644 index 000000000000..b7c59cce5dbb --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListConversations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class AsyncListConversations { + + public static void main(String[] args) throws Exception { + asyncListConversations(); + } + + public static void asyncListConversations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + dataChatServiceClient.listConversationsPagedCallable().futureCall(request); + // Do something. + for (Conversation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListConversations_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversationsPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversationsPaged.java new file mode 100644 index 000000000000..2f08a0089df4 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/AsyncListConversationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListConversations_Paged_async] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.ListConversationsResponse; +import com.google.cloud.geminidataanalytics.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListConversationsPaged { + + public static void main(String[] args) throws Exception { + asyncListConversationsPaged(); + } + + public static void asyncListConversationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListConversationsResponse response = + dataChatServiceClient.listConversationsCallable().call(request); + for (Conversation element : response.getConversationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListConversations_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversations.java new file mode 100644 index 000000000000..b692a35d6b5c --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListConversations_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListConversationsRequest; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListConversations { + + public static void main(String[] args) throws Exception { + syncListConversations(); + } + + public static void syncListConversations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Conversation element : dataChatServiceClient.listConversations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListConversations_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsLocationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsLocationname.java new file mode 100644 index 000000000000..64eacdeee703 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListConversations_Locationname_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListConversationsLocationname { + + public static void main(String[] args) throws Exception { + syncListConversationsLocationname(); + } + + public static void syncListConversationsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListConversations_Locationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsString.java new file mode 100644 index 000000000000..c0bd152f7fc7 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listconversations/SyncListConversationsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListConversations_String_sync] +import com.google.cloud.geminidataanalytics.v1.Conversation; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.LocationName; + +public class SyncListConversationsString { + + public static void main(String[] args) throws Exception { + syncListConversationsString(); + } + + public static void syncListConversationsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListConversations_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..46d8ddba4646 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataChatServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListLocations_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocationsPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..c26cb9503842 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListLocations_Paged_async] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataChatServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListLocations_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/SyncListLocations.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4137d37c044d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListLocations_sync] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataChatServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListLocations_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessages.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessages.java new file mode 100644 index 000000000000..e10920d2d417 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessages.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListMessages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; + +public class AsyncListMessages { + + public static void main(String[] args) throws Exception { + asyncListMessages(); + } + + public static void asyncListMessages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListMessagesRequest request = + ListMessagesRequest.newBuilder() + .setParent( + ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + dataChatServiceClient.listMessagesPagedCallable().futureCall(request); + // Do something. + for (StorageMessage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListMessages_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessagesPaged.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessagesPaged.java new file mode 100644 index 000000000000..f9659d05477d --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/AsyncListMessagesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListMessages_Paged_async] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.ListMessagesResponse; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; +import com.google.common.base.Strings; + +public class AsyncListMessagesPaged { + + public static void main(String[] args) throws Exception { + asyncListMessagesPaged(); + } + + public static void asyncListMessagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListMessagesRequest request = + ListMessagesRequest.newBuilder() + .setParent( + ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListMessagesResponse response = dataChatServiceClient.listMessagesCallable().call(request); + for (StorageMessage element : response.getMessagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListMessages_Paged_async] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessages.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessages.java new file mode 100644 index 000000000000..78aa5837e28a --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessages.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListMessages_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.ListMessagesRequest; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; + +public class SyncListMessages { + + public static void main(String[] args) throws Exception { + syncListMessages(); + } + + public static void syncListMessages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ListMessagesRequest request = + ListMessagesRequest.newBuilder() + .setParent( + ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (StorageMessage element : dataChatServiceClient.listMessages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListMessages_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesConversationname.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesConversationname.java new file mode 100644 index 000000000000..9463ba1d24a1 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesConversationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListMessages_Conversationname_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; + +public class SyncListMessagesConversationname { + + public static void main(String[] args) throws Exception { + syncListMessagesConversationname(); + } + + public static void syncListMessagesConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]"); + for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListMessages_Conversationname_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesString.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesString.java new file mode 100644 index 000000000000..37c93719a103 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservice/listmessages/SyncListMessagesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatService_ListMessages_String_sync] +import com.google.cloud.geminidataanalytics.v1.ConversationName; +import com.google.cloud.geminidataanalytics.v1.DataChatServiceClient; +import com.google.cloud.geminidataanalytics.v1.StorageMessage; + +public class SyncListMessagesString { + + public static void main(String[] args) throws Exception { + syncListMessagesString(); + } + + public static void syncListMessagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) { + String parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString(); + for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END geminidataanalytics_v1_generated_DataChatService_ListMessages_String_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservicesettings/createconversation/SyncCreateConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservicesettings/createconversation/SyncCreateConversation.java new file mode 100644 index 000000000000..e583fc0d33f7 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/datachatservicesettings/createconversation/SyncCreateConversation.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.samples; + +// [START geminidataanalytics_v1_generated_DataChatServiceSettings_CreateConversation_sync] +import com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings; +import java.time.Duration; + +public class SyncCreateConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversation(); + } + + public static void syncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataChatServiceSettings.Builder dataChatServiceSettingsBuilder = + DataChatServiceSettings.newBuilder(); + dataChatServiceSettingsBuilder + .createConversationSettings() + .setRetrySettings( + dataChatServiceSettingsBuilder + .createConversationSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataChatServiceSettings dataChatServiceSettings = dataChatServiceSettingsBuilder.build(); + } +} +// [END geminidataanalytics_v1_generated_DataChatServiceSettings_CreateConversation_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/createdataagent/SyncCreateDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/createdataagent/SyncCreateDataAgent.java new file mode 100644 index 000000000000..bfcb752c63e2 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/createdataagent/SyncCreateDataAgent.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub.samples; + +// [START geminidataanalytics_v1_generated_DataAgentServiceStubSettings_CreateDataAgent_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.geminidataanalytics.v1.stub.DataAgentServiceStubSettings; +import java.time.Duration; + +public class SyncCreateDataAgent { + + public static void main(String[] args) throws Exception { + syncCreateDataAgent(); + } + + public static void syncCreateDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceStubSettings.Builder dataAgentServiceSettingsBuilder = + DataAgentServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataAgentServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END geminidataanalytics_v1_generated_DataAgentServiceStubSettings_CreateDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/getdataagent/SyncGetDataAgent.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/getdataagent/SyncGetDataAgent.java new file mode 100644 index 000000000000..d899642f0a1f --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/dataagentservicestubsettings/getdataagent/SyncGetDataAgent.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub.samples; + +// [START geminidataanalytics_v1_generated_DataAgentServiceStubSettings_GetDataAgent_sync] +import com.google.cloud.geminidataanalytics.v1.stub.DataAgentServiceStubSettings; +import java.time.Duration; + +public class SyncGetDataAgent { + + public static void main(String[] args) throws Exception { + syncGetDataAgent(); + } + + public static void syncGetDataAgent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataAgentServiceStubSettings.Builder dataAgentServiceSettingsBuilder = + DataAgentServiceStubSettings.newBuilder(); + dataAgentServiceSettingsBuilder + .getDataAgentSettings() + .setRetrySettings( + dataAgentServiceSettingsBuilder + .getDataAgentSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataAgentServiceStubSettings dataAgentServiceSettings = dataAgentServiceSettingsBuilder.build(); + } +} +// [END geminidataanalytics_v1_generated_DataAgentServiceStubSettings_GetDataAgent_sync] diff --git a/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/datachatservicestubsettings/createconversation/SyncCreateConversation.java b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/datachatservicestubsettings/createconversation/SyncCreateConversation.java new file mode 100644 index 000000000000..2b3b60048c88 --- /dev/null +++ b/java-geminidataanalytics/samples/snippets/generated/com/google/cloud/geminidataanalytics/v1/stub/datachatservicestubsettings/createconversation/SyncCreateConversation.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.geminidataanalytics.v1.stub.samples; + +// [START geminidataanalytics_v1_generated_DataChatServiceStubSettings_CreateConversation_sync] +import com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStubSettings; +import java.time.Duration; + +public class SyncCreateConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversation(); + } + + public static void syncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataChatServiceStubSettings.Builder dataChatServiceSettingsBuilder = + DataChatServiceStubSettings.newBuilder(); + dataChatServiceSettingsBuilder + .createConversationSettings() + .setRetrySettings( + dataChatServiceSettingsBuilder + .createConversationSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataChatServiceStubSettings dataChatServiceSettings = dataChatServiceSettingsBuilder.build(); + } +} +// [END geminidataanalytics_v1_generated_DataChatServiceStubSettings_CreateConversation_sync] diff --git a/versions.txt b/versions.txt index 639b83859b81..a5a18b8c365b 100644 --- a/versions.txt +++ b/versions.txt @@ -1053,3 +1053,5 @@ grpc-google-cloud-firestore-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-admin-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-bundle-v1:3.42.0:3.42.1-SNAPSHOT +proto-google-cloud-geminidataanalytics-v1:0.20.0:0.21.0-SNAPSHOT +grpc-google-cloud-geminidataanalytics-v1:0.20.0:0.21.0-SNAPSHOT