From 840e78b6d38afe1080f29a0b3261124336dcf40c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 27 Jul 2023 18:55:02 +0000 Subject: [PATCH 1/2] feat: support conversational / multi-turn search feat: support tail suggestions in completion API feat: support image search feat: add skip reason for search summarization docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 551559583 Source-Link: https://github.com/googleapis/googleapis/commit/16ebd6c48352ae1d07ac09ebf9535fa4c07a2cbd Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b192e7226e272a6e755329aaf7f924f1e4eef4 Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiIwOWIxOTJlNzIyNmUyNzJhNmU3NTUzMjlhYWY3ZjkyNGYxZTRlZWY0In0= --- .../Cloud/Discoveryengine/V1/Common.php | 38 + .../Discoveryengine/V1/CompletionService.php | 45 + .../Cloud/Discoveryengine/V1/Document.php | Bin 0 -> 1797 bytes .../Discoveryengine/V1/DocumentService.php | 69 + .../Cloud/Discoveryengine/V1/ImportConfig.php | Bin 0 -> 3815 bytes .../Cloud/Discoveryengine/V1/PurgeConfig.php | 44 + .../Cloud/Discoveryengine/V1/Schema.php | Bin 0 -> 1478 bytes .../Discoveryengine/V1/SchemaService.php | 76 ++ .../Discoveryengine/V1/SearchService.php | Bin 0 -> 3710 bytes .../Cloud/Discoveryengine/V1/UserEvent.php | Bin 0 -> 3252 bytes .../Discoveryengine/V1/UserEventService.php | Bin 0 -> 3116 bytes .../DiscoveryEngine/V1/BigQuerySource.php | 325 +++++ .../V1/CollectUserEventRequest.php | 217 +++ .../V1/CompleteQueryRequest.php | 271 ++++ .../V1/CompleteQueryResponse.php | 73 + .../CompleteQueryResponse/QuerySuggestion.php | 70 + .../DiscoveryEngine/V1/CompletionInfo.php | 106 ++ .../V1/CreateDocumentRequest.php | 243 ++++ .../V1/CreateSchemaMetadata.php | 125 ++ .../V1/CreateSchemaRequest.php | 201 +++ .../DiscoveryEngine/V1/CustomAttribute.php | 158 +++ .../V1/DeleteDocumentRequest.php | 120 ++ .../V1/DeleteSchemaMetadata.php | 125 ++ .../V1/DeleteSchemaRequest.php | 88 ++ .../Cloud/DiscoveryEngine/V1/Document.php | 393 ++++++ .../DiscoveryEngine/V1/Document/Content.php | 181 +++ .../Cloud/DiscoveryEngine/V1/DocumentInfo.php | 213 +++ .../Cloud/DiscoveryEngine/V1/GcsSource.php | 181 +++ .../DiscoveryEngine/V1/GetDocumentRequest.php | 120 ++ .../DiscoveryEngine/V1/GetSchemaRequest.php | 88 ++ .../V1/ImportDocumentsMetadata.php | 194 +++ .../V1/ImportDocumentsRequest.php | 493 +++++++ .../ImportDocumentsRequest/InlineSource.php | 78 ++ .../ReconciliationMode.php | 66 + .../V1/ImportDocumentsResponse.php | 114 ++ .../DiscoveryEngine/V1/ImportErrorConfig.php | 84 ++ .../V1/ImportUserEventsMetadata.php | 194 +++ .../V1/ImportUserEventsRequest.php | 227 ++++ .../ImportUserEventsRequest/InlineSource.php | 70 + .../V1/ImportUserEventsResponse.php | 189 +++ .../V1/ListDocumentsRequest.php | 226 ++++ .../V1/ListDocumentsResponse.php | 115 ++ .../DiscoveryEngine/V1/ListSchemasRequest.php | 192 +++ .../V1/ListSchemasResponse.php | 115 ++ .../Cloud/DiscoveryEngine/V1/MediaInfo.php | 149 +++ .../Cloud/DiscoveryEngine/V1/PageInfo.php | 253 ++++ .../Cloud/DiscoveryEngine/V1/PanelInfo.php | 213 +++ .../V1/PurgeDocumentsMetadata.php | 194 +++ .../V1/PurgeDocumentsRequest.php | 153 +++ .../V1/PurgeDocumentsResponse.php | 112 ++ .../Cloud/DiscoveryEngine/V1/Schema.php | 154 +++ .../Cloud/DiscoveryEngine/V1/SearchInfo.php | 233 ++++ .../DiscoveryEngine/V1/SearchRequest.php | 779 +++++++++++ .../V1/SearchRequest/ContentSearchSpec.php | 85 ++ .../ContentSearchSpec/SnippetSpec.php | 116 ++ .../V1/SearchRequest/QueryExpansionSpec.php | 75 ++ .../QueryExpansionSpec/Condition.php | 68 + .../V1/SearchRequest/SpellCorrectionSpec.php | 78 ++ .../SpellCorrectionSpec/Mode.php | 70 + .../DiscoveryEngine/V1/SearchResponse.php | 253 ++++ .../V1/SearchResponse/SearchResult.php | 122 ++ .../DiscoveryEngine/V1/TransactionInfo.php | 369 +++++ .../V1/UpdateDocumentRequest.php | 149 +++ .../V1/UpdateSchemaMetadata.php | 125 ++ .../V1/UpdateSchemaRequest.php | 121 ++ .../Cloud/DiscoveryEngine/V1/UserEvent.php | 1166 ++++++++++++++++ .../Cloud/DiscoveryEngine/V1/UserInfo.php | 165 +++ .../V1/WriteUserEventRequest.php | 115 ++ .../complete_query.php | 81 ++ .../DocumentServiceClient/create_document.php | 98 ++ .../DocumentServiceClient/delete_document.php | 84 ++ .../V1/DocumentServiceClient/get_document.php | 86 ++ .../import_documents.php | 96 ++ .../DocumentServiceClient/list_documents.php | 88 ++ .../DocumentServiceClient/purge_documents.php | 109 ++ .../DocumentServiceClient/update_document.php | 59 + .../V1/SchemaServiceClient/create_schema.php | 96 ++ .../V1/SchemaServiceClient/delete_schema.php | 86 ++ .../V1/SchemaServiceClient/get_schema.php | 77 ++ .../V1/SchemaServiceClient/list_schemas.php | 77 ++ .../V1/SchemaServiceClient/update_schema.php | 71 + .../samples/V1/SearchServiceClient/search.php | 84 ++ .../collect_user_event.php | 80 ++ .../import_user_events.php | 144 ++ .../write_user_event.php | 117 ++ .../CompletionServiceBaseClient.php | 280 ++++ .../BaseClient/DocumentServiceBaseClient.php | 584 ++++++++ .../BaseClient/SchemaServiceBaseClient.php | 496 +++++++ .../BaseClient/SearchServiceBaseClient.php | 354 +++++ .../BaseClient/UserEventServiceBaseClient.php | 456 +++++++ .../src/V1/Client/CompletionServiceClient.php | 40 + .../src/V1/Client/DocumentServiceClient.php | 40 + .../v1/src/V1/Client/SchemaServiceClient.php | 40 + .../v1/src/V1/Client/SearchServiceClient.php | 40 + .../src/V1/Client/UserEventServiceClient.php | 40 + .../v1/src/V1/gapic_metadata.json | 139 ++ .../completion_service_client_config.json | 39 + .../completion_service_descriptor_config.php | 25 + .../completion_service_rest_client_config.php | 134 ++ .../document_service_client_config.json | 81 ++ .../document_service_descriptor_config.php | 123 ++ .../document_service_rest_client_config.php | 251 ++++ .../schema_service_client_config.json | 59 + .../schema_service_descriptor_config.php | 106 ++ .../schema_service_rest_client_config.php | 213 +++ .../search_service_client_config.json | 39 + .../search_service_descriptor_config.php | 36 + .../search_service_rest_client_config.php | 136 ++ .../user_event_service_client_config.json | 61 + .../user_event_service_descriptor_config.php | 59 + .../user_event_service_rest_client_config.php | 172 +++ .../V1/Client/CompletionServiceClientTest.php | 161 +++ .../V1/Client/DocumentServiceClientTest.php | 732 ++++++++++ .../V1/Client/SchemaServiceClientTest.php | 669 ++++++++++ .../V1/Client/SearchServiceClientTest.php | 184 +++ .../V1/Client/UserEventServiceClientTest.php | 401 ++++++ .../Cloud/Discoveryengine/V1Beta/Common.php | Bin 0 -> 1919 bytes .../V1Beta/CompletionService.php | 48 + .../Discoveryengine/V1Beta/Conversation.php | Bin 0 -> 2411 bytes .../V1Beta/ConversationalSearchService.php | 79 ++ .../Cloud/Discoveryengine/V1Beta/Document.php | Bin 0 -> 1838 bytes .../V1Beta/DocumentService.php | 69 + .../Discoveryengine/V1Beta/ImportConfig.php | Bin 0 -> 3905 bytes .../Discoveryengine/V1Beta/PurgeConfig.php | 44 + .../V1Beta/RecommendationService.php | 65 + .../Cloud/Discoveryengine/V1Beta/Schema.php | Bin 0 -> 1515 bytes .../Discoveryengine/V1Beta/SchemaService.php | 76 ++ .../Discoveryengine/V1Beta/SearchService.php | Bin 0 -> 6361 bytes .../Discoveryengine/V1Beta/UserEvent.php | Bin 0 -> 3329 bytes .../V1Beta/UserEventService.php | Bin 0 -> 3221 bytes .../DiscoveryEngine/V1beta/BigQuerySource.php | 325 +++++ .../V1beta/CollectUserEventRequest.php | 217 +++ .../V1beta/CompleteQueryRequest.php | 321 +++++ .../V1beta/CompleteQueryResponse.php | 115 ++ .../CompleteQueryResponse/QuerySuggestion.php | 70 + .../DiscoveryEngine/V1beta/CompletionInfo.php | 114 ++ .../DiscoveryEngine/V1beta/Conversation.php | 261 ++++ .../V1beta/Conversation/State.php | 64 + .../V1beta/ConversationContext.php | 109 ++ .../V1beta/ConversationMessage.php | 152 +++ .../V1beta/ConverseConversationRequest.php | 282 ++++ .../V1beta/ConverseConversationResponse.php | 157 +++ .../V1beta/CreateConversationRequest.php | 132 ++ .../V1beta/CreateDocumentRequest.php | 243 ++++ .../V1beta/CreateSchemaMetadata.php | 125 ++ .../V1beta/CreateSchemaRequest.php | 206 +++ .../V1beta/CustomAttribute.php | 158 +++ .../V1beta/DeleteConversationRequest.php | 86 ++ .../V1beta/DeleteDocumentRequest.php | 120 ++ .../V1beta/DeleteSchemaMetadata.php | 125 ++ .../V1beta/DeleteSchemaRequest.php | 88 ++ .../Cloud/DiscoveryEngine/V1beta/Document.php | 393 ++++++ .../V1beta/Document/Content.php | 193 +++ .../DiscoveryEngine/V1beta/DocumentInfo.php | 216 +++ .../DiscoveryEngine/V1beta/GcsSource.php | 201 +++ .../V1beta/GetConversationRequest.php | 86 ++ .../V1beta/GetDocumentRequest.php | 120 ++ .../V1beta/GetSchemaRequest.php | 88 ++ .../V1beta/ImportDocumentsMetadata.php | 194 +++ .../V1beta/ImportDocumentsRequest.php | 505 +++++++ .../ImportDocumentsRequest/InlineSource.php | 78 ++ .../ReconciliationMode.php | 66 + .../V1beta/ImportDocumentsResponse.php | 114 ++ .../V1beta/ImportErrorConfig.php | 84 ++ .../V1beta/ImportUserEventsMetadata.php | 194 +++ .../V1beta/ImportUserEventsRequest.php | 227 ++++ .../ImportUserEventsRequest/InlineSource.php | 70 + .../V1beta/ImportUserEventsResponse.php | 189 +++ .../Cloud/DiscoveryEngine/V1beta/Interval.php | 183 +++ .../V1beta/ListConversationsRequest.php | 274 ++++ .../V1beta/ListConversationsResponse.php | 101 ++ .../V1beta/ListDocumentsRequest.php | 231 ++++ .../V1beta/ListDocumentsResponse.php | 115 ++ .../V1beta/ListSchemasRequest.php | 192 +++ .../V1beta/ListSchemasResponse.php | 115 ++ .../DiscoveryEngine/V1beta/MediaInfo.php | 157 +++ .../Cloud/DiscoveryEngine/V1beta/PageInfo.php | 253 ++++ .../DiscoveryEngine/V1beta/PanelInfo.php | 213 +++ .../V1beta/PurgeDocumentsMetadata.php | 194 +++ .../V1beta/PurgeDocumentsRequest.php | 153 +++ .../V1beta/PurgeDocumentsResponse.php | 112 ++ .../V1beta/RecommendRequest.php | 565 ++++++++ .../V1beta/RecommendResponse.php | 197 +++ .../RecommendationResult.php | 169 +++ .../Cloud/DiscoveryEngine/V1beta/Reply.php | 101 ++ .../V1beta/Reply/Reference.php | 172 +++ .../Cloud/DiscoveryEngine/V1beta/Schema.php | 154 +++ .../DiscoveryEngine/V1beta/SearchInfo.php | 245 ++++ .../DiscoveryEngine/V1beta/SearchRequest.php | 1005 ++++++++++++++ .../V1beta/SearchRequest/BoostSpec.php | 82 ++ .../BoostSpec/ConditionBoostSpec.php | 188 +++ .../SearchRequest/ContentSearchSpec.php | 180 +++ .../ExtractiveContentSpec.php | 205 +++ .../ContentSearchSpec/SnippetSpec.php | 168 +++ .../ContentSearchSpec/SummarySpec.php | 301 +++++ .../V1beta/SearchRequest/FacetSpec.php | 362 +++++ .../SearchRequest/FacetSpec/FacetKey.php | 394 ++++++ .../V1beta/SearchRequest/ImageQuery.php | 81 ++ .../SearchRequest/QueryExpansionSpec.php | 75 ++ .../QueryExpansionSpec/Condition.php | 68 + .../SearchRequest/SpellCorrectionSpec.php | 78 ++ .../SpellCorrectionSpec/Mode.php | 70 + .../DiscoveryEngine/V1beta/SearchResponse.php | 479 +++++++ .../V1beta/SearchResponse/Facet.php | 142 ++ .../SearchResponse/Facet/FacetValue.php | 151 +++ .../SearchResponse/GuidedSearchResult.php | 105 ++ .../RefinementAttribute.php | 104 ++ .../V1beta/SearchResponse/SearchResult.php | 122 ++ .../V1beta/SearchResponse/Summary.php | 108 ++ .../Summary/SummarySkippedReason.php | 80 ++ .../DiscoveryEngine/V1beta/TextInput.php | 111 ++ .../V1beta/TransactionInfo.php | 377 ++++++ .../V1beta/UpdateConversationRequest.php | 158 +++ .../V1beta/UpdateDocumentRequest.php | 153 +++ .../V1beta/UpdateSchemaMetadata.php | 125 ++ .../V1beta/UpdateSchemaRequest.php | 129 ++ .../DiscoveryEngine/V1beta/UserEvent.php | 1186 +++++++++++++++++ .../Cloud/DiscoveryEngine/V1beta/UserInfo.php | 161 +++ .../V1beta/WriteUserEventRequest.php | 115 ++ .../complete_query.php | 81 ++ .../converse_conversation.php | 84 ++ .../create_conversation.php | 81 ++ .../delete_conversation.php | 78 ++ .../get_conversation.php | 77 ++ .../list_conversations.php | 82 ++ .../update_conversation.php | 64 + .../DocumentServiceClient/create_document.php | 98 ++ .../DocumentServiceClient/delete_document.php | 84 ++ .../DocumentServiceClient/get_document.php | 86 ++ .../import_documents.php | 96 ++ .../DocumentServiceClient/list_documents.php | 89 ++ .../DocumentServiceClient/purge_documents.php | 110 ++ .../DocumentServiceClient/update_document.php | 59 + .../RecommendationServiceClient/recommend.php | 126 ++ .../SchemaServiceClient/create_schema.php | 96 ++ .../SchemaServiceClient/delete_schema.php | 86 ++ .../V1beta/SchemaServiceClient/get_schema.php | 77 ++ .../SchemaServiceClient/list_schemas.php | 77 ++ .../SchemaServiceClient/update_schema.php | 71 + .../V1beta/SearchServiceClient/search.php | 84 ++ .../collect_user_event.php | 80 ++ .../import_user_events.php | 90 ++ .../write_user_event.php | 117 ++ .../CompletionServiceBaseClient.php | 294 ++++ .../ConversationalSearchServiceBaseClient.php | 604 +++++++++ .../BaseClient/DocumentServiceBaseClient.php | 622 +++++++++ .../RecommendationServiceBaseClient.php | 380 ++++++ .../BaseClient/SchemaServiceBaseClient.php | 528 ++++++++ .../BaseClient/SearchServiceBaseClient.php | 374 ++++++ .../BaseClient/UserEventServiceBaseClient.php | 484 +++++++ .../V1beta/Client/CompletionServiceClient.php | 42 + .../ConversationalSearchServiceClient.php | 42 + .../V1beta/Client/DocumentServiceClient.php | 42 + .../Client/RecommendationServiceClient.php | 42 + .../src/V1beta/Client/SchemaServiceClient.php | 42 + .../src/V1beta/Client/SearchServiceClient.php | 42 + .../V1beta/Client/UserEventServiceClient.php | 42 + .../v1beta/src/V1beta/gapic_metadata.json | 192 +++ .../completion_service_client_config.json | 39 + .../completion_service_descriptor_config.php | 25 + .../completion_service_rest_client_config.php | 150 +++ ...sational_search_service_client_config.json | 64 + ...ional_search_service_descriptor_config.php | 100 ++ ...onal_search_service_rest_client_config.php | 242 ++++ .../document_service_client_config.json | 81 ++ .../document_service_descriptor_config.php | 123 ++ .../document_service_rest_client_config.php | 267 ++++ .../recommendation_service_client_config.json | 39 + ...commendation_service_descriptor_config.php | 28 + ...ommendation_service_rest_client_config.php | 152 +++ .../schema_service_client_config.json | 59 + .../schema_service_descriptor_config.php | 106 ++ .../schema_service_rest_client_config.php | 229 ++++ .../search_service_client_config.json | 39 + .../search_service_descriptor_config.php | 36 + .../search_service_rest_client_config.php | 152 +++ .../user_event_service_client_config.json | 61 + .../user_event_service_descriptor_config.php | 59 + .../user_event_service_rest_client_config.php | 188 +++ .../Client/CompletionServiceClientTest.php | 165 +++ .../ConversationalSearchServiceClientTest.php | 507 +++++++ .../Client/DocumentServiceClientTest.php | 732 ++++++++++ .../RecommendationServiceClientTest.php | 182 +++ .../V1beta/Client/SchemaServiceClientTest.php | 669 ++++++++++ .../V1beta/Client/SearchServiceClientTest.php | 188 +++ .../Client/UserEventServiceClientTest.php | 390 ++++++ 286 files changed, 47712 insertions(+) create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEventService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/BigQuerySource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/DocumentServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/SchemaServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/SearchServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/UserEventServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/CompletionService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ConversationalSearchService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/SchemaService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/SearchService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/UserEvent.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/UserEventService.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/BigQuerySource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/ConversationalSearchServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/DocumentServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/RecommendationServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/SchemaServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/SearchServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/UserEventServiceClient.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php create mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php new file mode 100644 index 000000000000..928101577619 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + ' +� +,google/cloud/discoveryengine/v1/common.protogoogle.cloud.discoveryengine.v1"0 +CustomAttribute +text (  +numbers ("/ +UserInfo +user_id (  + +user_agent ( B� +#com.google.cloud.discoveryengine.v1B CommonProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1�A� +%discoveryengine.googleapis.com/BranchQprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}�A� +(discoveryengine.googleapis.com/DataStore?projects/{project}/locations/{location}/dataStores/{data_store}Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}�A� +,discoveryengine.googleapis.com/ServingConfig_projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php new file mode 100644 index 000000000000..805cebeb3268 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile( + ' +� +8google/cloud/discoveryengine/v1/completion_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"� +CompleteQueryRequestD + +data_store ( B0�A�A* +(discoveryengine.googleapis.com/DataStore +query ( B�A + query_model (  +user_pseudo_id ( "� +CompleteQueryResponsea +query_suggestions ( 2F.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion% +QuerySuggestion + +suggestion ( 2� +CompletionService� + CompleteQuery5.google.cloud.discoveryengine.v1.CompleteQueryRequest6.google.cloud.discoveryengine.v1.CompleteQueryResponse"�����B/v1/{data_store=projects/*/locations/*/dataStores/*}:completeQueryZRP/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQueryR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +#com.google.cloud.discoveryengine.v1BCompletionServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php new file mode 100644 index 0000000000000000000000000000000000000000..c703f467db497752085b99d3c5020ae3ce7a9a9f GIT binary patch literal 1797 zcmbtV-D(p-6t+qKGPRVh7setuYN09UF3~HuR%x0Ti`a%%3d%y5%udoNo1JBLHd0H_ zHxRt=0lX1>6raLtpTaXcyGehsVsAQo_RM$A_nos}o<5HbB6J@&S;!<&%*UN0tPU8C zq)>v20C$pZmq|=TKjHzCHpcZGyuI@VH|kq&?!whrB$6^0_k`#L%%Ooue8=Z86$2)Z zSlHtsa|Tt%7c}X!P}wOoLLuq1I3kqcW~=s^DdH1Fyk?5xZE6&+ej3HwudX3P0}{u$ zo}r;*gyAnrIsvCRRz$(SWgfSA$Q366{{WoUahC)!gUjc0yGckD7a`Ucc0$T3tJq-b z+~r7s2J1NQtEFWDNxZF4F&UD;tFxF&9w{MPkm|ZUrbc4wNM$uEtKoPTS4@wtd#=fK ztYpGYR>xQ}mB?@{?OOv3M{a?0?%O>yF8{)7`Vr?4CWSF5SuiNyHtQ zu{3+QbUS;MZY50CiBl@(?Y+-aXf|Ip%SLnNWm~Umc@j@l<{sV5nl%>yz&2XEyk^}% zrNdZ+CVL99OAuT{lX~;Z6Z*MU{IxMW|T zg23FPYF_s;(stgry=g95OUR0d1c-M2Eo%Ik6#ogj;WNnx%x|CMIGxtIjH7P9xbzCm zk)u$15ZAcwpS~gxOwdv}vZX!yy_X F^atCVSfT&` literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php new file mode 100644 index 000000000000..dae3ac3c9423 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php @@ -0,0 +1,69 @@ +internalAddGeneratedFile( + ' +� +6google/cloud/discoveryengine/v1/document_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto.google/cloud/discoveryengine/v1/document.proto3google/cloud/discoveryengine/v1/import_config.proto2google/cloud/discoveryengine/v1/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S +GetDocumentRequest= +name ( B/�A�A) +\'discoveryengine.googleapis.com/Document"| +ListDocumentsRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/Branch + page_size ( + +page_token ( "n +ListDocumentsResponse< + documents ( 2).google.cloud.discoveryengine.v1.Document +next_page_token ( "� +CreateDocumentRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/Branch@ +document ( 2).google.cloud.discoveryengine.v1.DocumentB�A + document_id ( B�A"p +UpdateDocumentRequest@ +document ( 2).google.cloud.discoveryengine.v1.DocumentB�A + allow_missing ("V +DeleteDocumentRequest= +name ( B/�A�A) +\'discoveryengine.googleapis.com/Document2� +DocumentService� + GetDocument3.google.cloud.discoveryengine.v1.GetDocumentRequest).google.cloud.discoveryengine.v1.Document"�����E/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZUS/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� + ListDocuments5.google.cloud.discoveryengine.v1.ListDocumentsRequest6.google.cloud.discoveryengine.v1.ListDocumentsResponse"�����E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZUS/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents�Aparent� +CreateDocument6.google.cloud.discoveryengine.v1.CreateDocumentRequest).google.cloud.discoveryengine.v1.Document"�����"E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZ_"S/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:document�Aparent,document,document_id� +UpdateDocument6.google.cloud.discoveryengine.v1.UpdateDocumentRequest).google.cloud.discoveryengine.v1.Document"�����2N/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZh2\\/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document� +DeleteDocument6.google.cloud.discoveryengine.v1.DeleteDocumentRequest.google.protobuf.Empty"�����*E/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZU*S/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� +ImportDocuments7.google.cloud.discoveryengine.v1.ImportDocumentsRequest.google.longrunning.Operation"�����"L/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Z_"Z/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*�Ar +7google.cloud.discoveryengine.v1.ImportDocumentsResponse7google.cloud.discoveryengine.v1.ImportDocumentsMetadata� +PurgeDocuments6.google.cloud.discoveryengine.v1.PurgeDocumentsRequest.google.longrunning.Operation"�����"K/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge:*Z^"Y/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge:*�Ap +6google.cloud.discoveryengine.v1.PurgeDocumentsResponse6google.cloud.discoveryengine.v1.PurgeDocumentsMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +#com.google.cloud.discoveryengine.v1BDocumentServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..75ae09dbf45d2cc5aefc94a77496d56c6e8fafbf GIT binary patch literal 3815 zcmd5<-E!MR6t0~#6R(>lRY>E8VJh4*bqbXm_Xb=7^^cOelh~=_W(G!#MwZsjc4SHH zN*Myv8-{Bhf;;*QJOMlaw_NiG+`!pg$w_Rd4uKiSjWerrzCFL++4J$I!C`>zsN2}X z)C#eqc8}HY5UT<8L*MpYwHx(%n5wov2#AZRrmFRp+H7@Hz24}&3#!bIsEx~N-}n12 zF50diIYoys+dsne7<+x<;o{LokqiQ#hNkU%J<`_%K0=-~z$~zAtZwgBcX4PrR%jX9 z0?MdyD5HKB$~f3~jF9bGjHwL)Srdrp8>GTt5OrN*t1Pra__<4%Njwq~%OzifbDL_< zav27IaoJwv*&*>gl`FJ78yD79iOFT}20jF1Q%!8!YF;MMRyV?yLA0Wr1+ zcAY9dw2p{R%jFZVPC(96ZR0qp7uGs2RYu*nqXG89iyLq*)C-2Ge)PAnhFR(msI$-- z1Q)lX9oWV`lu^VkuG2XVuu+FTnyey<=)or>E}4qs3@c;{nyWC(DbMgd^ydnCbcwD~ zZc8Oiw4yfBirUe}+N~JX3P_R0xt1NdrcJxhi4z*jKb$5XLDo#n(-v#Q))fTo#ncyl= zW#4oN&CLp+5sT-9N)}~?=H)*`HzWt@l=@T>q4E|&950}_N4}CaJ-t$00QaEz zd--o?(W+D(wiRpRFC!39Y_vc;7iim*G$3M?E$K-B&Z{f!96+rh&}4jt&k#9XS{dKK z!;vlBpL)YE&k0NmEp|yC?54+wwLEy)QgJHQ*}Nx!PtY917s^#euKEya=a0&LR2c0e zS&Yy^OoQQAgo3d4f&8)Z6kWqS9r37(%cnHep0P}>bvILV}b86tgNF2=>`MZba8T>lK27bsY!ku^O)CswsZ-PmABFIOCKuF zk(9w8h7qKKm&c6q4qA!4NuPPfXY#Knc#}LSlp@O76hqURoNh#Jv!#UXB#!_WX~Q|e z6{3K*zf_Pey-8sOEwIS8F*|EC9QQ2ZMij@sNMnCYCHq*nwe?-S*{SR-rIdLzyY*scXDNM(0lyz_LwNlDcLZ4d zE{*QMIGGlvYCQMl$QRGtz0~Ksvfbol5>u(~kF8=bv0xh;so0?VcHf6n`BOd%^}KB;}s-3cW(;FD1F{Pyhe` literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php new file mode 100644 index 000000000000..9257bd60b630 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +� +2google/cloud/discoveryengine/v1/purge_config.protogoogle.cloud.discoveryengine.v1google/api/resource.protogoogle/protobuf/timestamp.proto"z +PurgeDocumentsRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/Branch +filter ( B�A +force ("q +PurgeDocumentsResponse + purge_count (B + purge_sample ( B,�A) +\'discoveryengine.googleapis.com/Document"� +PurgeDocumentsMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp + success_count ( + failure_count (B� +#com.google.cloud.discoveryengine.v1BPurgeConfigProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php new file mode 100644 index 0000000000000000000000000000000000000000..08ef353e4790982e155db455f1f409d5419f3b0e GIT binary patch literal 1478 zcmb7E!EO^V5G5(Cz!gG7LX--rrY&kJm0bcimx7We4LP)lnko`#rO5F*iL32;WqTu) zYJY|!pTZw-O_nIwEf#W@WJ zETrzJc1FXr?d+I39yu~onnCt z0QDEey?_xY6;}GU$z+#>Ofej=&$^yH*vEmS`s%!IKMsjvJcQ;#GbFUQ4K1ee-Hf=d ze-DncY8gs29bO|;RD?M2s#FreBE>~ZyCO88YC@#36t}am29EV%(dLNIT#|cGiI`rE z4xykb7U6E1w*g2dEAJZ4$`SJp7!CXi9pVw=0-()b-&~ z4qv`w8DnMNpAdAQ+o?Dy$rQK+elLQZ|LLQ`n)PR=uI=HKJj@lBUq5lO;9~&CGV$R~;W1b~l{_5# zFKGY!+WZLIHGRL5GyBTIkMbh=mAfqe%z+oPsat5BwRH68xmhMH9qN=4CEbf`mAC;X zy776aZR2I)nrUk5zNFe})?H~fNj8MqXe&ty?6!zn3j!V42AXbeAF6T>EZL})KRK|W zs~Yon)8kc^ZP_g|c&*&0L+hBaZfF_sIi=B*X|b81GwSWmS-#{SRvYd8W~X-iv368% z9M!(&*XpSNIjI0S)v*B8QW0}HrEg;oFVm>0NLe3GtJGzF-NGQ0;vh5wgixo{ThhcU Z{$^`30XtR#t|-QhYLR-{nNC0gz+YW|`9J^w literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php new file mode 100644 index 000000000000..14ff76787073 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php @@ -0,0 +1,76 @@ +internalAddGeneratedFile( + ' +� +4google/cloud/discoveryengine/v1/schema_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto,google/cloud/discoveryengine/v1/schema.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"O +GetSchemaRequest; +name ( B-�A�A\' +%discoveryengine.googleapis.com/Schema"} +ListSchemasRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStore + page_size ( + +page_token ( "h +ListSchemasResponse8 +schemas ( 2\'.google.cloud.discoveryengine.v1.Schema +next_page_token ( "� +CreateSchemaRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStore< +schema ( 2\'.google.cloud.discoveryengine.v1.SchemaB�A + schema_id ( B�A"j +UpdateSchemaRequest< +schema ( 2\'.google.cloud.discoveryengine.v1.SchemaB�A + allow_missing ("R +DeleteSchemaRequest; +name ( B-�A�A\' +%discoveryengine.googleapis.com/Schema"x +CreateSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp"x +UpdateSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp"x +DeleteSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp2� + SchemaService� + GetSchema1.google.cloud.discoveryengine.v1.GetSchemaRequest\'.google.cloud.discoveryengine.v1.Schema"�����8/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}ZHF/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}�Aname� + ListSchemas3.google.cloud.discoveryengine.v1.ListSchemasRequest4.google.cloud.discoveryengine.v1.ListSchemasResponse"�����8/v1/{parent=projects/*/locations/*/dataStores/*}/schemasZHF/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas�Aparent� + CreateSchema4.google.cloud.discoveryengine.v1.CreateSchemaRequest.google.longrunning.Operation"�����"8/v1/{parent=projects/*/locations/*/dataStores/*}/schemas:schemaZP"F/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas:schema�Aparent,schema,schema_id�A^ +&google.cloud.discoveryengine.v1.Schema4google.cloud.discoveryengine.v1.CreateSchemaMetadata� + UpdateSchema4.google.cloud.discoveryengine.v1.UpdateSchemaRequest.google.longrunning.Operation"�����2?/v1/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}:schemaZW2M/v1/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}:schema�A^ +&google.cloud.discoveryengine.v1.Schema4google.cloud.discoveryengine.v1.UpdateSchemaMetadata� + DeleteSchema4.google.cloud.discoveryengine.v1.DeleteSchemaRequest.google.longrunning.Operation"�����*8/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}ZH*F/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}�Aname�AM +google.protobuf.Empty4google.cloud.discoveryengine.v1.DeleteSchemaMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +#com.google.cloud.discoveryengine.v1BSchemaServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php new file mode 100644 index 0000000000000000000000000000000000000000..774cd8e7f13f46ef3ca712dcf7c287ff73d5c76d GIT binary patch literal 3710 zcmbVP&2!sS5Xa6(<8_;~O4GU?h6=Zxrkz%vgdP~BDfL%9hQtnW6Q&(gjVwRgqOzXQ zdrBKRxiG_DP%d1#FfhZ73*5N&2>$>FPW%ZyvF}NCJ{*&nTpUTezumXH@3*`6Kk~XB zTvN-$CBDf?OKt9|yh~Kir<_{UQJX=#O?=g&JOWrdDf@)l#wY_$4O-cj%`Cb@{9WR9Y?owrma>ePzST7t@po*CXwm?HYxW59OpB=Hjr=;{ zX3OMeqb#u+1%cHl9>!{HFRcJrj>(u>mzebs5?+Cde_qgZY)fU_>^sjCWwnro58TWW|YWUqS^!?CLNo!bx*!ss+AE+@WgI*lS> zmT!BU`Wq;!>m9-eaTRYCZ$)MWoZVIzLmzd0$jMce`vEy({`H?o|=|2_aPDBiIC6Q zG_`=QlFPTEAdXD5wuKrMR8T&KY0vb{9!n+F2~^cjR6P_K?!QKeKo|BiANW{Q=1F29CPF=YlOb6byV z=i})gV=#YQzP4bpM_VLvxjd%J#~^C!2$xxbN%5;(g!AjQV(EyJ^DtN6Dwj)jd4O7V z?a3iue~rO~;S@LFEOTwoBUnMAbOh}rm)FMhcnDXkhoGW*(+?qe;1T0|p=Z7{`erQ} zxLn$uQn1c_f+HNkfySV&vnvT~CS8K$!7H7FiRWZj>LipKFtuYk0glHR*>$L2$9LTZ#M%``9?^zf_xLoWtelxOKuD?Fn)*#h_npJc&Rf& zBmEhi9oQEJ0pds?vcD)RFw^f`QT$G3>HfH}{Cc9_#$@}ki1KqBrbAnbcIu#@uZ*X& zr1Kl6*9_>J?NjSnEo%2j9K<})}dB7S>pdpr z1*;c3F22~)nPfUWcKfN7c{TXdfef z#Br~=GW6#A_#EYsQfgwb`0qw7b2bbWiNIW0NhgPVg%^-j2}99V5et~F9JTtD_;58z+YSJbxv literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..baa1b8a95c67834d45bce950736c486108cc0737 GIT binary patch literal 3252 zcmbVO&2k$>5RTTrYB`p@Aw)J5S(Fs9Az8)Y0-ImUQY=#yTa_4Bg;LelYIh`0Wwo=} znH2~s2X0)r@dO+>bK?o1cnHos0w;QAe`L#X$>59a+3s(8zV80IA3P3^L%3n=l7K{x zAfC}38RD22VZ;P;nQwICUXMhE%LXC!Nn{#E-(hU z`YiTp9_20@l4wMNJ`G51xK)ceiEJ_?fiM*~K;R4r4;_~nyY2cjA{@^VPG?u)bao_8 zr*RsmbF_6I!1W!@jV}?eDdFHdFz_dgyFPUdE*ycsZc=X3fC}pP^jmz^L!;;ToS^qv z+g=>Fg0jGn4hMltHa3j}Q`+7P8Pf33$O3CiW{{Q6ULZ&mIDV%=xEs+>u&9lumenUB z=Tn|+Y^K*rINCEdk{B)POpp%^5yj->?S>H%5l6v&6}JR z8B!Km*7#Lpkn>!hlQf+d_Bt<5ogFq9u;Aj?=e#yztVB%5|8PB|SW&_mgm3p%sl4-u zrit73ygW}&vA8#KW+l(J;7=Xy{@1G3uO}X+>H~A456t1#`dSLE61Ta**9@=6TT{Kv99wpvNk+%6v03KaVm~ z2Dyh07|IooM#L4i0*T1$81r43L!3oj2jGNrtQ;BRyo^y^7dm}{Qh?VjT=2R!dZ_Ex zVAT;KqTN{5qb=Ag5>yry@G{KzsE-0rDXRaUK+$7vJU~6-6)PxWp~YvuX`N}M>6dz`#;NdbH^72t*PQ3x$4ONIA|dMK4_T~;WysVLaz zsh>jn0#-!i1l&=Qngq10pzcnEIvhJHtTHSJr;pj>l`>LV)UU#2tf>J@qQv7Bb-WLd z<%#ghs$$=odYh~&H9*YmG|7ZF0}+k%M*sujQ74IBzhFL|Nf#OSx(nq=$P&!FBBP|O z^v5tabo`j8Mk?K#PRvfs1smj;miAep`VtoNLcIbdS>{7ZzLvGGnpcq}Yv0AW-e=J$ zXGb*Ti(d(!m%*-x=BJ0dhVRC3}f+o>p0Q zNx|rAuq2ppd|R1trR{Sn5sJOjj`cEJMp+)4SAWE?@xnuDyZ6tW{H&E5doOklj+)P3Hurb;_M5+G*LT&bZSKfb z+iYa3c2lkF=F!$4nMEhv#>eY;V$;EW{BNzAz*v^Tv8)Lo%R1WX&MSUDy_IiRx06lx S#A1BzQmibK)%6X$0r(el3rgNPPc>-E?kwAoo^ zXB~wq7Y?Z6$_*hTI3YkBkoYHZgnxhoC;kG&iJ95ibz;|Kjqt^*nfJbV^Sw9UdvCrS zjzX{wnN>3@Ks6BR=fKg8`z@BZndO5j7#Kx8Y9v5p2|3k6z=h5s9gX zY&axj=p)PXN!+*kIP%CC(PI=0ae%CG*@`1XyJ(C8*5zMg>>*Pg0zlv%q9}Ad1e=}e zL&V&^%Uq`^@tm5#bL!{uoc;190G{tg5q!+i8Ul7NK?P3$#vYFhOLaHTteGQQKmN{#qF@>pj5|AoCW6ZT~p zioOhrF~zGzL5GY>tRNPxUg9goZB0bF1TJ;Ck^JXdcYk;uEN3w)k=K7LfEUk`uD@|1 zFXtW9b=MZ))A&XE^tV60DEy=u717h4BJDC$a&` zMitpdqFn4VsXh46Xy*Xr4OwJNh{8hf`ey~OJe_X+{)L21yQGx8lzQ@#HHB_hxo#WZ zB;
    9rhpnM;nkS8A-&<);10v8=V|LIXTH-Pb(~K4)aB2mVzkcb%=D;R`PqMBi`EXY30>_ zm%?8wrf3S0ZCOW0M~duBC*7Ehl7aJf=(}t{=wbC~0jzTkP4hCZV^yzZ`B#!62f2=R z@Gx;nHI~cqkj%`pJOuvyr(zF#n=>ol7OvJ?d$sm{WA}r`PP4Vs_`YzxDMwpVP7Y>0 z9c>$OR5tg^r>TXbrr*igoogle.cloud.discoveryengine.v1.BigQuerySource + */ +class BigQuerySource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_id = ''; + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + */ + protected $gcs_staging_dir = ''; + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms the + * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * + * Generated from protobuf field string data_schema = 6; + */ + protected $data_schema = ''; + protected $partition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $partition_date + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * @type string $project_id + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * @type string $dataset_id + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * @type string $table_id + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * @type string $data_schema + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms the + * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * + * Generated from protobuf field .google.type.Date partition_date = 5; + * @return \Google\Type\Date|null + */ + public function getPartitionDate() + { + return $this->readOneof(5); + } + + public function hasPartitionDate() + { + return $this->hasOneof(5); + } + + /** + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * + * Generated from protobuf field .google.type.Date partition_date = 5; + * @param \Google\Type\Date $var + * @return $this + */ + public function setPartitionDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms the + * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * + * Generated from protobuf field string data_schema = 6; + * @return string + */ + public function getDataSchema() + { + return $this->data_schema; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms the + * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * + * Generated from protobuf field string data_schema = 6; + * @param string $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkString($var, True); + $this->data_schema = $var; + + return $this; + } + + /** + * @return string + */ + public function getPartition() + { + return $this->whichOneof("partition"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php new file mode 100644 index 000000000000..932e8e6dbe75 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php @@ -0,0 +1,217 @@ +google.cloud.discoveryengine.v1.CollectUserEventRequest + */ +class CollectUserEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = ''; + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for 3rd party + * requests. + * + * Generated from protobuf field optional string uri = 3; + */ + protected $uri = null; + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + */ + protected $ets = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type string $user_event + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * @type string $uri + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for 3rd party + * requests. + * @type int|string $ets + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEventService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserEvent() + { + return $this->user_event; + } + + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkString($var, True); + $this->user_event = $var; + + return $this; + } + + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for 3rd party + * requests. + * + * Generated from protobuf field optional string uri = 3; + * @return string + */ + public function getUri() + { + return isset($this->uri) ? $this->uri : ''; + } + + public function hasUri() + { + return isset($this->uri); + } + + public function clearUri() + { + unset($this->uri); + } + + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for 3rd party + * requests. + * + * Generated from protobuf field optional string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + * @return int|string + */ + public function getEts() + { + return isset($this->ets) ? $this->ets : 0; + } + + public function hasEts() + { + return isset($this->ets); + } + + public function clearEts() + { + unset($this->ets); + } + + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + * @param int|string $var + * @return $this + */ + public function setEts($var) + { + GPBUtil::checkInt64($var); + $this->ets = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php new file mode 100644 index 000000000000..29cee2b13cad --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php @@ -0,0 +1,271 @@ +google.cloud.discoveryengine.v1.CompleteQueryRequest + */ +class CompleteQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $data_store = ''; + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] + * dataStores. + * + * Generated from protobuf field string query_model = 3; + */ + protected $query_model = ''; + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + */ + protected $user_pseudo_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_store + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * @type string $query + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * @type string $query_model + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] + * dataStores. + * @type string $user_pseudo_id + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDataStore() + { + return $this->data_store; + } + + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataStore($var) + { + GPBUtil::checkString($var, True); + $this->data_store = $var; + + return $this; + } + + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] + * dataStores. + * + * Generated from protobuf field string query_model = 3; + * @return string + */ + public function getQueryModel() + { + return $this->query_model; + } + + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] + * dataStores. + * + * Generated from protobuf field string query_model = 3; + * @param string $var + * @return $this + */ + public function setQueryModel($var) + { + GPBUtil::checkString($var, True); + $this->query_model = $var; + + return $this; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php new file mode 100644 index 000000000000..d08febbe893a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php @@ -0,0 +1,73 @@ +google.cloud.discoveryengine.v1.CompleteQueryResponse + */ +class CompleteQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + */ + private $query_suggestions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $query_suggestions + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuerySuggestions() + { + return $this->query_suggestions; + } + + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuerySuggestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion::class); + $this->query_suggestions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php new file mode 100644 index 000000000000..f9b9def77159 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + */ +class QuerySuggestion extends \Google\Protobuf\Internal\Message +{ + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + */ + protected $suggestion = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $suggestion + * The suggestion for the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @return string + */ + public function getSuggestion() + { + return $this->suggestion; + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @param string $var + * @return $this + */ + public function setSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->suggestion = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuerySuggestion::class, \Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse_QuerySuggestion::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php new file mode 100644 index 000000000000..c9a22fbf87c1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php @@ -0,0 +1,106 @@ +google.cloud.discoveryengine.v1.CompletionInfo + */ +class CompletionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * + * Generated from protobuf field string selected_suggestion = 1; + */ + protected $selected_suggestion = ''; + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + */ + protected $selected_position = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $selected_suggestion + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * @type int $selected_position + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * position, starting from 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * + * Generated from protobuf field string selected_suggestion = 1; + * @return string + */ + public function getSelectedSuggestion() + { + return $this->selected_suggestion; + } + + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * + * Generated from protobuf field string selected_suggestion = 1; + * @param string $var + * @return $this + */ + public function setSelectedSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->selected_suggestion = $var; + + return $this; + } + + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + * @return int + */ + public function getSelectedPosition() + { + return $this->selected_position; + } + + /** + * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + * @param int $var + * @return $this + */ + public function setSelectedPosition($var) + { + GPBUtil::checkInt32($var); + $this->selected_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php new file mode 100644 index 000000000000..82088e790bb0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php @@ -0,0 +1,243 @@ +google.cloud.discoveryengine.v1.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [Document][google.cloud.discoveryengine.v1.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1.Document], which will become the + * final component of the + * [Document.name][google.cloud.discoveryengine.v1.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1.Document]s with the same + * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document_id = ''; + + /** + * @param string $parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Please see + * {@see DocumentServiceClient::branchName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1\Document $document Required. The [Document][google.cloud.discoveryengine.v1.Document] to + * create. + * @param string $documentId Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1.Document], which will become the + * final component of the + * [Document.name][google.cloud.discoveryengine.v1.Document.name]. + * + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1.Document]s with the same + * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * @return \Google\Cloud\DiscoveryEngine\V1\CreateDocumentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1\Document $document, string $documentId): self + { + return (new self()) + ->setParent($parent) + ->setDocument($document) + ->setDocumentId($documentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @type \Google\Cloud\DiscoveryEngine\V1\Document $document + * Required. The [Document][google.cloud.discoveryengine.v1.Document] to + * create. + * @type string $document_id + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1.Document], which will become the + * final component of the + * [Document.name][google.cloud.discoveryengine.v1.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1.Document]s with the same + * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The [Document][google.cloud.discoveryengine.v1.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The [Document][google.cloud.discoveryengine.v1.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1.Document], which will become the + * final component of the + * [Document.name][google.cloud.discoveryengine.v1.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1.Document]s with the same + * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDocumentId() + { + return $this->document_id; + } + + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1.Document], which will become the + * final component of the + * [Document.name][google.cloud.discoveryengine.v1.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1.Document]s with the same + * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->document_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php new file mode 100644 index 000000000000..9372aa713f66 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1.CreateSchemaMetadata + */ +class CreateSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php new file mode 100644 index 000000000000..53ae57f984be --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php @@ -0,0 +1,201 @@ +google.cloud.discoveryengine.v1.CreateSchemaRequest + */ +class CreateSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = null; + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema_id = ''; + + /** + * @param string $parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see + * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1\Schema $schema Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. + * @param string $schemaId Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + * + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * @return \Google\Cloud\DiscoveryEngine\V1\CreateSchemaRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1\Schema $schema, string $schemaId): self + { + return (new self()) + ->setParent($parent) + ->setSchema($schema) + ->setSchemaId($schemaId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type \Google\Cloud\DiscoveryEngine\V1\Schema $schema + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. + * @type string $schema_id + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class); + $this->schema = $var; + + return $this; + } + + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSchemaId() + { + return $this->schema_id; + } + + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSchemaId($var) + { + GPBUtil::checkString($var, True); + $this->schema_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php new file mode 100644 index 000000000000..96ea2b044491 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php @@ -0,0 +1,158 @@ +google.cloud.discoveryengine.v1.CustomAttribute + */ +class CustomAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + */ + private $text; + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + */ + private $numbers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $text + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type array|\Google\Protobuf\Internal\RepeatedField $numbers + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getText() + { + return $this->text; + } + + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setText($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->text = $arr; + + return $this; + } + + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNumbers() + { + return $this->numbers; + } + + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNumbers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->numbers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php new file mode 100644 index 000000000000..dceaa5af0bdb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php @@ -0,0 +1,120 @@ +google.cloud.discoveryengine.v1.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does + * not exist, a `NOT_FOUND` error is returned. Please see + * {@see DocumentServiceClient::documentName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\DeleteDocumentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does + * not exist, a `NOT_FOUND` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php new file mode 100644 index 000000000000..b333f2a7e673 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1.DeleteSchemaMetadata + */ +class DeleteSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php new file mode 100644 index 000000000000..bdfd90bd77c2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php @@ -0,0 +1,88 @@ +google.cloud.discoveryengine.v1.DeleteSchemaRequest + */ +class DeleteSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see + * {@see SchemaServiceClient::schemaName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\DeleteSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php new file mode 100644 index 000000000000..46b5f5f5e16e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php @@ -0,0 +1,393 @@ +google.cloud.discoveryengine.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $id = ''; + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + */ + protected $schema_id = ''; + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; + */ + protected $content = null; + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + */ + protected $parent_document_id = ''; + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $derived_struct_data = null; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $struct_data + * The structured JSON data for the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * @type string $json_data + * The JSON string representation of the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * @type string $name + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * @type string $id + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * @type string $schema_id + * The identifier of the schema located in the same data store. + * @type \Google\Cloud\DiscoveryEngine\V1\Document\Content $content + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * @type string $parent_document_id + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * @type \Google\Protobuf\Struct $derived_struct_data + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The structured JSON data for the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field .google.protobuf.Struct struct_data = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getStructData() + { + return $this->readOneof(4); + } + + public function hasStructData() + { + return $this->hasOneof(4); + } + + /** + * The structured JSON data for the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field .google.protobuf.Struct struct_data = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setStructData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The JSON string representation of the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field string json_data = 5; + * @return string + */ + public function getJsonData() + { + return $this->readOneof(5); + } + + public function hasJsonData() + { + return $this->hasOneof(5); + } + + /** + * The JSON string representation of the document. It should conform to the + * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] + * or an `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field string json_data = 5; + * @param string $var + * @return $this + */ + public function setJsonData($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + * @return string + */ + public function getSchemaId() + { + return $this->schema_id; + } + + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + * @param string $var + * @return $this + */ + public function setSchemaId($var) + { + GPBUtil::checkString($var, True); + $this->schema_id = $var; + + return $this; + } + + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; + * @return \Google\Cloud\DiscoveryEngine\V1\Document\Content|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; + * @param \Google\Cloud\DiscoveryEngine\V1\Document\Content $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document\Content::class); + $this->content = $var; + + return $this; + } + + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + * @return string + */ + public function getParentDocumentId() + { + return $this->parent_document_id; + } + + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + * @param string $var + * @return $this + */ + public function setParentDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->parent_document_id = $var; + + return $this; + } + + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Struct|null + */ + public function getDerivedStructData() + { + return $this->derived_struct_data; + } + + public function hasDerivedStructData() + { + return isset($this->derived_struct_data); + } + + public function clearDerivedStructData() + { + unset($this->derived_struct_data); + } + + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDerivedStructData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->derived_struct_data = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php new file mode 100644 index 000000000000..b394729ad29f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php @@ -0,0 +1,181 @@ +google.cloud.discoveryengine.v1.Document.Content + */ +class Content extends \Google\Protobuf\Internal\Message +{ + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF) + * * `text/html` (HTML) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + */ + protected $mime_type = ''; + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $raw_bytes + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * @type string $uri + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * @type string $mime_type + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF) + * * `text/html` (HTML) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field bytes raw_bytes = 2; + * @return string + */ + public function getRawBytes() + { + return $this->readOneof(2); + } + + public function hasRawBytes() + { + return $this->hasOneof(2); + } + + /** + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field bytes raw_bytes = 2; + * @param string $var + * @return $this + */ + public function setRawBytes($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * + * Generated from protobuf field string uri = 3; + * @return string + */ + public function getUri() + { + return $this->readOneof(3); + } + + public function hasUri() + { + return $this->hasOneof(3); + } + + /** + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * + * Generated from protobuf field string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF) + * * `text/html` (HTML) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF) + * * `text/html` (HTML) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Content::class, \Google\Cloud\DiscoveryEngine\V1\Document_Content::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php new file mode 100644 index 000000000000..ee58cf2d96ce --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php @@ -0,0 +1,213 @@ +google.cloud.discoveryengine.v1.DocumentInfo + */ +class DocumentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + */ + protected $quantity = null; + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + */ + private $promotion_ids; + protected $document_descriptor; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. The Document resource ID. + * @type string $name + * Required. The Document resource full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * @type int $quantity + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Document resource ID. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->readOneof(1); + } + + public function hasId() + { + return $this->hasOneof(1); + } + + /** + * Required. The Document resource ID. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. The Document resource full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->readOneof(2); + } + + public function hasName() + { + return $this->hasOneof(2); + } + + /** + * Required. The Document resource full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + * @return int + */ + public function getQuantity() + { + return isset($this->quantity) ? $this->quantity : 0; + } + + public function hasQuantity() + { + return isset($this->quantity); + } + + public function clearQuantity() + { + unset($this->quantity); + } + + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + * @param int $var + * @return $this + */ + public function setQuantity($var) + { + GPBUtil::checkInt32($var); + $this->quantity = $var; + + return $this; + } + + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPromotionIds() + { + return $this->promotion_ids; + } + + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPromotionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->promotion_ids = $arr; + + return $this; + } + + /** + * @return string + */ + public function getDocumentDescriptor() + { + return $this->whichOneof("document_descriptor"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php new file mode 100644 index 000000000000..cb6a2d1122b4 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php @@ -0,0 +1,181 @@ +google.cloud.discoveryengine.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $input_uris; + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1.Document] per line. Each + * document must + * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` will become a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + */ + protected $data_schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $input_uris + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * @type string $data_schema + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1.Document] per line. Each + * document must + * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` will become a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputUris() + { + return $this->input_uris; + } + + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_uris = $arr; + + return $this; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1.Document] per line. Each + * document must + * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` will become a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + * @return string + */ + public function getDataSchema() + { + return $this->data_schema; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1.Document] per line. Each + * document must + * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` will become a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data + * store. This can only be used by the GENERIC Data Store vertical. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + * @param string $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkString($var, True); + $this->data_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php new file mode 100644 index 000000000000..78e81f128155 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php @@ -0,0 +1,120 @@ +google.cloud.discoveryengine.v1.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1.Document] does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the requested [Document][google.cloud.discoveryengine.v1.Document] does + * not exist, a `NOT_FOUND` error is returned. Please see + * {@see DocumentServiceClient::documentName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\GetDocumentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1.Document] does + * not exist, a `NOT_FOUND` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1.Document] does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1.Document] does + * not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php new file mode 100644 index 000000000000..4a9036b219e9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php @@ -0,0 +1,88 @@ +google.cloud.discoveryengine.v1.GetSchemaRequest + */ +class GetSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see + * {@see SchemaServiceClient::schemaName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\GetSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php new file mode 100644 index 000000000000..fcc1ed29ed0e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1.ImportDocumentsMetadata + */ +class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were processed successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php new file mode 100644 index 000000000000..40ee0fcb274e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php @@ -0,0 +1,493 @@ +google.cloud.discoveryengine.v1.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + */ + protected $error_config = null; + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + */ + protected $reconciliation_mode = 0; + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have + * to be specified using + * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], + * otherwises, documents without IDs will fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + */ + protected $auto_generate_ids = false; + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of + * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. + * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column will be used as the + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field + * or the BigQuery column must be of string type, and the values must be set + * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * with 1-63 characters. Otherwise, documents without valid IDs will fail to + * be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + */ + protected $id_field = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource $inline_source + * The Inline source for the input content for documents. + * @type \Google\Cloud\DiscoveryEngine\V1\GcsSource $gcs_source + * Cloud Storage location for the input content. + * @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source + * BigQuery input source. + * @type string $parent + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config + * The desired location of errors incurred during the Import. + * @type int $reconciliation_mode + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * @type bool $auto_generate_ids + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have + * to be specified using + * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], + * otherwises, documents without IDs will fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. + * @type string $id_field + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of + * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. + * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column will be used as the + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field + * or the BigQuery column must be of string type, and the values must be set + * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * with 1-63 characters. Otherwise, documents without valid IDs will fail to + * be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The Inline source for the input content for documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource inline_source = 2; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource|null + */ + public function getInlineSource() + { + return $this->readOneof(2); + } + + public function hasInlineSource() + { + return $this->hasOneof(2); + } + + /** + * The Inline source for the input content for documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource inline_source = 2; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource $var + * @return $this + */ + public function setInlineSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3; + * @return \Google\Cloud\DiscoveryEngine\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(3); + } + + public function hasGcsSource() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3; + * @param \Google\Cloud\DiscoveryEngine\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\GcsSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4; + * @return \Google\Cloud\DiscoveryEngine\V1\BigQuerySource|null + */ + public function getBigquerySource() + { + return $this->readOneof(4); + } + + public function hasBigquerySource() + { + return $this->hasOneof(4); + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4; + * @param \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $var + * @return $this + */ + public function setBigquerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigQuerySource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * @return int + */ + public function getReconciliationMode() + { + return $this->reconciliation_mode; + } + + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * @param int $var + * @return $this + */ + public function setReconciliationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\ReconciliationMode::class); + $this->reconciliation_mode = $var; + + return $this; + } + + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have + * to be specified using + * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], + * otherwises, documents without IDs will fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + * @return bool + */ + public function getAutoGenerateIds() + { + return $this->auto_generate_ids; + } + + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have + * to be specified using + * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], + * otherwises, documents without IDs will fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + * @param bool $var + * @return $this + */ + public function setAutoGenerateIds($var) + { + GPBUtil::checkBool($var); + $this->auto_generate_ids = $var; + + return $this; + } + + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of + * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. + * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column will be used as the + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field + * or the BigQuery column must be of string type, and the values must be set + * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * with 1-63 characters. Otherwise, documents without valid IDs will fail to + * be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + * @return string + */ + public function getIdField() + { + return $this->id_field; + } + + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of + * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. + * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column will be used as the + * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field + * or the BigQuery column must be of string type, and the values must be set + * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * with 1-63 characters. Otherwise, documents without valid IDs will fail to + * be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + * @param string $var + * @return $this + */ + public function setIdField($var) + { + GPBUtil::checkString($var, True); + $this->id_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php new file mode 100644 index 000000000000..91d8e2deac22 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php @@ -0,0 +1,78 @@ +google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * Recommended max of 100 items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->documents = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest_InlineSource::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php new file mode 100644 index 000000000000..3bd3f7cb3ce6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php @@ -0,0 +1,66 @@ +google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode + */ +class ReconciliationMode +{ + /** + * Defaults to INCREMENTAL. + * + * Generated from protobuf enum RECONCILIATION_MODE_UNSPECIFIED = 0; + */ + const RECONCILIATION_MODE_UNSPECIFIED = 0; + /** + * Inserts new documents or updates existing documents. + * + * Generated from protobuf enum INCREMENTAL = 1; + */ + const INCREMENTAL = 1; + /** + * Calculates diff and replaces the entire document dataset. Existing + * documents may be deleted if they are not present in the source location. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::RECONCILIATION_MODE_UNSPECIFIED => 'RECONCILIATION_MODE_UNSPECIFIED', + self::INCREMENTAL => 'INCREMENTAL', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReconciliationMode::class, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest_ReconciliationMode::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php new file mode 100644 index 000000000000..418453382756 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php @@ -0,0 +1,114 @@ +google.cloud.discoveryengine.v1.ImportDocumentsResponse + */ +class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + */ + private $error_samples; + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + */ + protected $error_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples + * A sample of errors encountered while processing the request. + * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config + * Echoes the destination for the complete errors in the request if set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorSamples() + { + return $this->error_samples; + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorSamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->error_samples = $arr; + + return $this; + } + + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php new file mode 100644 index 000000000000..fc0b136a9a50 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php @@ -0,0 +1,84 @@ +google.cloud.discoveryengine.v1.ImportErrorConfig + */ +class ImportErrorConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_prefix + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors will be written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors will be written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * + * Generated from protobuf field string gcs_prefix = 1; + * @return string + */ + public function getGcsPrefix() + { + return $this->readOneof(1); + } + + public function hasGcsPrefix() + { + return $this->hasOneof(1); + } + + /** + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors will be written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * + * Generated from protobuf field string gcs_prefix = 1; + * @param string $var + * @return $this + */ + public function setGcsPrefix($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php new file mode 100644 index 000000000000..63b5eecf2321 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1.ImportUserEventsMetadata + */ +class ImportUserEventsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were processed successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php new file mode 100644 index 000000000000..e7b9dedcab68 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php @@ -0,0 +1,227 @@ +google.cloud.discoveryengine.v1.ImportUserEventsRequest + */ +class ImportUserEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + */ + protected $error_config = null; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource $inline_source + * Required. The Inline source for the input content for UserEvents. + * @type \Google\Cloud\DiscoveryEngine\V1\GcsSource $gcs_source + * Required. Cloud Storage location for the input content. + * @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source + * Required. BigQuery input source. + * @type string $parent + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Inline source for the input content for UserEvents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource inline_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource|null + */ + public function getInlineSource() + { + return $this->readOneof(2); + } + + public function hasInlineSource() + { + return $this->hasOneof(2); + } + + /** + * Required. The Inline source for the input content for UserEvents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource inline_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource $var + * @return $this + */ + public function setInlineSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(3); + } + + public function hasGcsSource() + { + return $this->hasOneof(3); + } + + /** + * Required. Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\GcsSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\BigQuerySource|null + */ + public function getBigquerySource() + { + return $this->readOneof(4); + } + + public function hasBigquerySource() + { + return $this->hasOneof(4); + } + + /** + * Required. BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $var + * @return $this + */ + public function setBigquerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigQuerySource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php new file mode 100644 index 000000000000..57f60a5f14e6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $user_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\UserEvent>|\Google\Protobuf\Internal\RepeatedField $user_events + * Required. A list of user events to import. Recommended max of 10k items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserEvents() + { + return $this->user_events; + } + + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DiscoveryEngine\V1\UserEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\UserEvent::class); + $this->user_events = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest_InlineSource::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php new file mode 100644 index 000000000000..564563223aa5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php @@ -0,0 +1,189 @@ +google.cloud.discoveryengine.v1.ImportUserEventsResponse + */ +class ImportUserEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + */ + private $error_samples; + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + */ + protected $error_config = null; + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + */ + protected $joined_events_count = 0; + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + */ + protected $unjoined_events_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples + * A sample of errors encountered while processing the request. + * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config + * Echoes the destination for the complete errors if this field was set in + * the request. + * @type int|string $joined_events_count + * Count of user events imported with complete existing Documents. + * @type int|string $unjoined_events_count + * Count of user events imported, but with Document information not found + * in the existing Branch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorSamples() + { + return $this->error_samples; + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorSamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->error_samples = $arr; + + return $this; + } + + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; + * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + * @return int|string + */ + public function getJoinedEventsCount() + { + return $this->joined_events_count; + } + + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + * @param int|string $var + * @return $this + */ + public function setJoinedEventsCount($var) + { + GPBUtil::checkInt64($var); + $this->joined_events_count = $var; + + return $this; + } + + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + * @return int|string + */ + public function getUnjoinedEventsCount() + { + return $this->unjoined_events_count; + } + + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + * @param int|string $var + * @return $this + */ + public function setUnjoinedEventsCount($var) + { + GPBUtil::checkInt64($var); + $this->unjoined_events_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php new file mode 100644 index 000000000000..e5bef2190ea6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php @@ -0,0 +1,226 @@ +google.cloud.discoveryengine.v1.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list [Documents][]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to 100. The maximum allowed value is 1000. + * Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * + * If the caller does not have permission to list [Documents][]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. Please see + * {@see DocumentServiceClient::branchName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\ListDocumentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list [Documents][]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * @type int $page_size + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to 100. The maximum allowed value is 1000. + * Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * @type string $page_token + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list [Documents][]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list [Documents][]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to 100. The maximum allowed value is 1000. + * Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to 100. The maximum allowed value is 1000. + * Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php new file mode 100644 index 000000000000..6a0ca3c4c9eb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The [Document][google.cloud.discoveryengine.v1.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; + */ + private $documents; + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * The [Document][google.cloud.discoveryengine.v1.Document]s. + * @type string $next_page_token + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * The [Document][google.cloud.discoveryengine.v1.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The [Document][google.cloud.discoveryengine.v1.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php new file mode 100644 index 000000000000..d627a855cfeb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php @@ -0,0 +1,192 @@ +google.cloud.discoveryengine.v1.ListSchemasRequest + */ +class ListSchemasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to + * return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see + * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1\ListSchemasRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type int $page_size + * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to + * return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to + * return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to + * return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php new file mode 100644 index 000000000000..4705d7ca0f55 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1.ListSchemasResponse + */ +class ListSchemasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The [Schema][google.cloud.discoveryengine.v1.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; + */ + private $schemas; + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas + * The [Schema][google.cloud.discoveryengine.v1.Schema]s. + * @type string $next_page_token + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * The [Schema][google.cloud.discoveryengine.v1.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchemas() + { + return $this->schemas; + } + + /** + * The [Schema][google.cloud.discoveryengine.v1.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Schema::class); + $this->schemas = $arr; + + return $this; + } + + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php new file mode 100644 index 000000000000..d0f24f41d58a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php @@ -0,0 +1,149 @@ +google.cloud.discoveryengine.v1.MediaInfo + */ +class MediaInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should + * be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + */ + protected $media_progress_duration = null; + /** + * Media progress should be computed using only the media_progress_duration + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + */ + protected $media_progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $media_progress_duration + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should + * be set to 90. + * @type float $media_progress_percentage + * Media progress should be computed using only the media_progress_duration + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should + * be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMediaProgressDuration() + { + return $this->media_progress_duration; + } + + public function hasMediaProgressDuration() + { + return isset($this->media_progress_duration); + } + + public function clearMediaProgressDuration() + { + unset($this->media_progress_duration); + } + + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should + * be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMediaProgressDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->media_progress_duration = $var; + + return $this; + } + + /** + * Media progress should be computed using only the media_progress_duration + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + * @return float + */ + public function getMediaProgressPercentage() + { + return isset($this->media_progress_percentage) ? $this->media_progress_percentage : 0.0; + } + + public function hasMediaProgressPercentage() + { + return isset($this->media_progress_percentage); + } + + public function clearMediaProgressPercentage() + { + unset($this->media_progress_percentage); + } + + /** + * Media progress should be computed using only the media_progress_duration + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + * @param float $var + * @return $this + */ + public function setMediaProgressPercentage($var) + { + GPBUtil::checkFloat($var); + $this->media_progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php new file mode 100644 index 000000000000..03ee5f4110fe --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php @@ -0,0 +1,253 @@ +google.cloud.discoveryengine.v1.PageInfo + */ +class PageInfo extends \Google\Protobuf\Internal\Message +{ + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageViewId` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + */ + protected $pageview_id = ''; + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * "pageCategory" : "Sales > 2017 Black Friday Deals". + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string page_category = 2; + */ + protected $page_category = ''; + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + */ + protected $uri = ''; + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + */ + protected $referrer_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pageview_id + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageViewId` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * @type string $page_category + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * "pageCategory" : "Sales > 2017 Black Friday Deals". + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * @type string $uri + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * @type string $referrer_uri + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageViewId` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + * @return string + */ + public function getPageviewId() + { + return $this->pageview_id; + } + + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageViewId` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + * @param string $var + * @return $this + */ + public function setPageviewId($var) + { + GPBUtil::checkString($var, True); + $this->pageview_id = $var; + + return $this; + } + + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * "pageCategory" : "Sales > 2017 Black Friday Deals". + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string page_category = 2; + * @return string + */ + public function getPageCategory() + { + return $this->page_category; + } + + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * "pageCategory" : "Sales > 2017 Black Friday Deals". + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string page_category = 2; + * @param string $var + * @return $this + */ + public function setPageCategory($var) + { + GPBUtil::checkString($var, True); + $this->page_category = $var; + + return $this; + } + + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + * @return string + */ + public function getReferrerUri() + { + return $this->referrer_uri; + } + + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + * @param string $var + * @return $this + */ + public function setReferrerUri($var) + { + GPBUtil::checkString($var, True); + $this->referrer_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php new file mode 100644 index 000000000000..d80f94dd4e0f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php @@ -0,0 +1,213 @@ +google.cloud.discoveryengine.v1.PanelInfo + */ +class PanelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $panel_id = ''; + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must + * also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + */ + protected $panel_position = null; + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + */ + protected $total_panels = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $panel_id + * Required. The panel ID. + * @type string $display_name + * The display name of the panel. + * @type int $panel_position + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must + * also be set. + * @type int $total_panels + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] + * is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPanelId() + { + return $this->panel_id; + } + + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPanelId($var) + { + GPBUtil::checkString($var, True); + $this->panel_id = $var; + + return $this; + } + + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must + * also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + * @return int + */ + public function getPanelPosition() + { + return isset($this->panel_position) ? $this->panel_position : 0; + } + + public function hasPanelPosition() + { + return isset($this->panel_position); + } + + public function clearPanelPosition() + { + unset($this->panel_position); + } + + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must + * also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + * @param int $var + * @return $this + */ + public function setPanelPosition($var) + { + GPBUtil::checkInt32($var); + $this->panel_position = $var; + + return $this; + } + + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + * @return int + */ + public function getTotalPanels() + { + return isset($this->total_panels) ? $this->total_panels : 0; + } + + public function hasTotalPanels() + { + return isset($this->total_panels); + } + + public function clearTotalPanels() + { + unset($this->total_panels); + } + + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + * @param int $var + * @return $this + */ + public function setTotalPanels($var) + { + GPBUtil::checkInt32($var); + $this->total_panels = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php new file mode 100644 index 000000000000..e059a000bd93 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + */ +class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were deleted successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php new file mode 100644 index 000000000000..5837015fdf4d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.discoveryengine.v1.PurgeDocumentsRequest + */ +class PurgeDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @type string $filter + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * @type bool $force + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php new file mode 100644 index 000000000000..76d2ceda2540 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php @@ -0,0 +1,112 @@ +google.cloud.discoveryengine.v1.PurgeDocumentsResponse + */ +class PurgeDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + */ + protected $purge_count = 0; + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + */ + private $purge_sample; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $purge_count + * The total count of documents purged as a result of the operation. + * @type array|\Google\Protobuf\Internal\RepeatedField $purge_sample + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + * @return int|string + */ + public function getPurgeCount() + { + return $this->purge_count; + } + + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + * @param int|string $var + * @return $this + */ + public function setPurgeCount($var) + { + GPBUtil::checkInt64($var); + $this->purge_count = $var; + + return $this; + } + + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPurgeSample() + { + return $this->purge_sample; + } + + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPurgeSample($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->purge_sample = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php new file mode 100644 index 000000000000..64fc1fe7b94a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php @@ -0,0 +1,154 @@ +google.cloud.discoveryengine.v1.Schema + */ +class Schema extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $struct_schema + * The structured representation of the schema. + * @type string $json_schema + * The JSON representation of the schema. + * @type string $name + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\Schema::initOnce(); + parent::__construct($data); + } + + /** + * The structured representation of the schema. + * + * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getStructSchema() + { + return $this->readOneof(2); + } + + public function hasStructSchema() + { + return $this->hasOneof(2); + } + + /** + * The structured representation of the schema. + * + * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setStructSchema($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The JSON representation of the schema. + * + * Generated from protobuf field string json_schema = 3; + * @return string + */ + public function getJsonSchema() + { + return $this->readOneof(3); + } + + public function hasJsonSchema() + { + return $this->hasOneof(3); + } + + /** + * The JSON representation of the schema. + * + * Generated from protobuf field string json_schema = 3; + * @param string $var + * @return $this + */ + public function setJsonSchema($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php new file mode 100644 index 000000000000..34f3bf43cc53 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php @@ -0,0 +1,233 @@ +google.cloud.discoveryengine.v1.SearchInfo + */ +class SearchInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or + * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string search_query = 1; + */ + protected $search_query = ''; + /** + * The order in which products are returned, if applicable. + * See [SearchRequest.order_by][] for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string order_by = 2; + */ + protected $order_by = ''; + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] + * for definition. + * If this field is negative, an INVALID_ARGUMENT is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $search_query + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or + * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an INVALID_ARGUMENT error is returned. + * @type string $order_by + * The order in which products are returned, if applicable. + * See [SearchRequest.order_by][] for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * @type int $offset + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] + * for definition. + * If this field is negative, an INVALID_ARGUMENT is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or + * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string search_query = 1; + * @return string + */ + public function getSearchQuery() + { + return $this->search_query; + } + + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or + * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string search_query = 1; + * @param string $var + * @return $this + */ + public function setSearchQuery($var) + { + GPBUtil::checkString($var, True); + $this->search_query = $var; + + return $this; + } + + /** + * The order in which products are returned, if applicable. + * See [SearchRequest.order_by][] for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string order_by = 2; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order in which products are returned, if applicable. + * See [SearchRequest.order_by][] for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string order_by = 2; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] + * for definition. + * If this field is negative, an INVALID_ARGUMENT is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + * @return int + */ + public function getOffset() + { + return isset($this->offset) ? $this->offset : 0; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] + * for definition. + * If this field is negative, an INVALID_ARGUMENT is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php new file mode 100644 index 000000000000..dfd57af8f690 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php @@ -0,0 +1,779 @@ +google.cloud.discoveryengine.v1.SearchRequest + */ +class SearchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + */ + protected $branch = ''; + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + */ + protected $query = ''; + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to a reasonable value. The maximum allowed + * value is 100. Values above 100 will be coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as + * relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is + * unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + */ + protected $offset = 0; + /** + * Information about the end user. + * Highly recommended for analytics. The user_agent string in UserInfo will + * be used to deduce device_type for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; + */ + protected $user_info = null; + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + */ + private $params; + /** + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + */ + protected $query_expansion_spec = null; + /** + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + */ + protected $spell_correction_spec = null; + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + */ + protected $user_pseudo_id = ''; + /** + * The content search spec that configs the desired behavior of content + * search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; + */ + protected $content_search_spec = null; + /** + * Whether to turn on safe search. This is only supported for + * [ContentConfig.PUBLIC_WEBSITE][]. + * + * Generated from protobuf field bool safe_search = 20; + */ + protected $safe_search = false; + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + */ + private $user_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serving_config + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @type string $branch + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * @type string $query + * Raw search query. + * @type int $page_size + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to a reasonable value. The maximum allowed + * value is 100. Values above 100 will be coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type string $page_token + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * @type int $offset + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as + * relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is + * unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type \Google\Cloud\DiscoveryEngine\V1\UserInfo $user_info + * Information about the end user. + * Highly recommended for analytics. The user_agent string in UserInfo will + * be used to deduce device_type for analytics. + * @type array|\Google\Protobuf\Internal\MapField $params + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec $query_expansion_spec + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec $spell_correction_spec + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * @type string $user_pseudo_id + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec $content_search_spec + * The content search spec that configs the desired behavior of content + * search. + * @type bool $safe_search + * Whether to turn on safe search. This is only supported for + * [ContentConfig.PUBLIC_WEBSITE][]. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getBranch() + { + return $this->branch; + } + + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBranch($var) + { + GPBUtil::checkString($var, True); + $this->branch = $var; + + return $this; + } + + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to a reasonable value. The maximum allowed + * value is 100. Values above 100 will be coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to + * return. If unspecified, defaults to a reasonable value. The maximum allowed + * value is 100. Values above 100 will be coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as + * relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is + * unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as + * relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is + * unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + + /** + * Information about the end user. + * Highly recommended for analytics. The user_agent string in UserInfo will + * be used to deduce device_type for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; + * @return \Google\Cloud\DiscoveryEngine\V1\UserInfo|null + */ + public function getUserInfo() + { + return $this->user_info; + } + + public function hasUserInfo() + { + return isset($this->user_info); + } + + public function clearUserInfo() + { + unset($this->user_info); + } + + /** + * Information about the end user. + * Highly recommended for analytics. The user_agent string in UserInfo will + * be used to deduce device_type for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; + * @param \Google\Cloud\DiscoveryEngine\V1\UserInfo $var + * @return $this + */ + public function setUserInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserInfo::class); + $this->user_info = $var; + + return $this; + } + + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->params = $arr; + + return $this; + } + + /** + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec|null + */ + public function getQueryExpansionSpec() + { + return $this->query_expansion_spec; + } + + public function hasQueryExpansionSpec() + { + return isset($this->query_expansion_spec); + } + + public function clearQueryExpansionSpec() + { + unset($this->query_expansion_spec); + } + + /** + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec $var + * @return $this + */ + public function setQueryExpansionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec::class); + $this->query_expansion_spec = $var; + + return $this; + } + + /** + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec|null + */ + public function getSpellCorrectionSpec() + { + return $this->spell_correction_spec; + } + + public function hasSpellCorrectionSpec() + { + return isset($this->spell_correction_spec); + } + + public function clearSpellCorrectionSpec() + { + unset($this->spell_correction_spec); + } + + /** + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec $var + * @return $this + */ + public function setSpellCorrectionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec::class); + $this->spell_correction_spec = $var; + + return $this; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * The content search spec that configs the desired behavior of content + * search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec|null + */ + public function getContentSearchSpec() + { + return $this->content_search_spec; + } + + public function hasContentSearchSpec() + { + return isset($this->content_search_spec); + } + + public function clearContentSearchSpec() + { + unset($this->content_search_spec); + } + + /** + * The content search spec that configs the desired behavior of content + * search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec $var + * @return $this + */ + public function setContentSearchSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec::class); + $this->content_search_spec = $var; + + return $this; + } + + /** + * Whether to turn on safe search. This is only supported for + * [ContentConfig.PUBLIC_WEBSITE][]. + * + * Generated from protobuf field bool safe_search = 20; + * @return bool + */ + public function getSafeSearch() + { + return $this->safe_search; + } + + /** + * Whether to turn on safe search. This is only supported for + * [ContentConfig.PUBLIC_WEBSITE][]. + * + * Generated from protobuf field bool safe_search = 20; + * @param bool $var + * @return $this + */ + public function setSafeSearch($var) + { + GPBUtil::checkBool($var); + $this->safe_search = $var; + + return $this; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php new file mode 100644 index 000000000000..af123b1d9bc6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php @@ -0,0 +1,85 @@ +google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + */ +class ContentSearchSpec extends \Google\Protobuf\Internal\Message +{ + /** + * If there is no snippet spec provided, there will be no snippet in the + * search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + */ + protected $snippet_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec $snippet_spec + * If there is no snippet spec provided, there will be no snippet in the + * search result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * If there is no snippet spec provided, there will be no snippet in the + * search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec|null + */ + public function getSnippetSpec() + { + return $this->snippet_spec; + } + + public function hasSnippetSpec() + { + return isset($this->snippet_spec); + } + + public function clearSnippetSpec() + { + unset($this->snippet_spec); + } + + /** + * If there is no snippet spec provided, there will be no snippet in the + * search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec $var + * @return $this + */ + public function setSnippetSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec::class); + $this->snippet_spec = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentSearchSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_ContentSearchSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php new file mode 100644 index 000000000000..9a15204a7c6a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php @@ -0,0 +1,116 @@ +google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec + */ +class SnippetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Max number of snippets returned in each search result. + * If the matching snippets is less than the max_snippet_count, return all + * of the snippets; otherwise, return the max_snippet_count. + * At most 5 snippets will be returned for each SearchResult. + * + * Generated from protobuf field int32 max_snippet_count = 1; + */ + protected $max_snippet_count = 0; + /** + * if true, only snippet reference is returned. + * + * Generated from protobuf field bool reference_only = 2; + */ + protected $reference_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_snippet_count + * Max number of snippets returned in each search result. + * If the matching snippets is less than the max_snippet_count, return all + * of the snippets; otherwise, return the max_snippet_count. + * At most 5 snippets will be returned for each SearchResult. + * @type bool $reference_only + * if true, only snippet reference is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Max number of snippets returned in each search result. + * If the matching snippets is less than the max_snippet_count, return all + * of the snippets; otherwise, return the max_snippet_count. + * At most 5 snippets will be returned for each SearchResult. + * + * Generated from protobuf field int32 max_snippet_count = 1; + * @return int + */ + public function getMaxSnippetCount() + { + return $this->max_snippet_count; + } + + /** + * Max number of snippets returned in each search result. + * If the matching snippets is less than the max_snippet_count, return all + * of the snippets; otherwise, return the max_snippet_count. + * At most 5 snippets will be returned for each SearchResult. + * + * Generated from protobuf field int32 max_snippet_count = 1; + * @param int $var + * @return $this + */ + public function setMaxSnippetCount($var) + { + GPBUtil::checkInt32($var); + $this->max_snippet_count = $var; + + return $this; + } + + /** + * if true, only snippet reference is returned. + * + * Generated from protobuf field bool reference_only = 2; + * @return bool + */ + public function getReferenceOnly() + { + return $this->reference_only; + } + + /** + * if true, only snippet reference is returned. + * + * Generated from protobuf field bool reference_only = 2; + * @param bool $var + * @return $this + */ + public function setReferenceOnly($var) + { + GPBUtil::checkBool($var); + $this->reference_only = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SnippetSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_ContentSearchSpec_SnippetSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php new file mode 100644 index 000000000000..6ad22de76c72 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php @@ -0,0 +1,75 @@ +google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec + */ +class QueryExpansionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; + */ + protected $condition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $condition + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * @return int + */ + public function getCondition() + { + return $this->condition; + } + + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * @param int $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec\Condition::class); + $this->condition = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryExpansionSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_QueryExpansionSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php new file mode 100644 index 000000000000..56b0c02ecb48 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition + */ +class Condition +{ + /** + * Unspecified query expansion condition. In this case, server behavior + * defaults to + * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf enum CONDITION_UNSPECIFIED = 0; + */ + const CONDITION_UNSPECIFIED = 0; + /** + * Disabled query expansion. Only the exact search query is used, even if + * [SearchResponse.total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + * is zero. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Automatic query expansion built by the Search API. + * + * Generated from protobuf enum AUTO = 2; + */ + const AUTO = 2; + + private static $valueToName = [ + self::CONDITION_UNSPECIFIED => 'CONDITION_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::AUTO => 'AUTO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Condition::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_QueryExpansionSpec_Condition::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php new file mode 100644 index 000000000000..6c4f39250b54 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php @@ -0,0 +1,78 @@ +google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec + */ +class SpellCorrectionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec\Mode::class); + $this->mode = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpellCorrectionSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_SpellCorrectionSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php new file mode 100644 index 000000000000..307a50970c6c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode + */ +class Mode +{ + /** + * Unspecified spell correction mode. In this case, server behavior + * defaults to + * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Search API will try to find a spell suggestion if there + * is any and put in the + * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1.SearchResponse.corrected_query]. + * The spell suggestion will not be used as the search query. + * + * Generated from protobuf enum SUGGESTION_ONLY = 1; + */ + const SUGGESTION_ONLY = 1; + /** + * Automatic spell correction built by the Search API. Search will + * be based on the corrected query if found. + * + * Generated from protobuf enum AUTO = 2; + */ + const AUTO = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::SUGGESTION_ONLY => 'SUGGESTION_ONLY', + self::AUTO => 'AUTO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_SpellCorrectionSpec_Mode::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php new file mode 100644 index 000000000000..c052d79d7905 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php @@ -0,0 +1,253 @@ +google.cloud.discoveryengine.v1.SearchResponse + */ +class SearchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; + */ + private $results; + /** + * The estimated total count of matched items irrespective of pagination. The + * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + */ + protected $attribution_token = ''; + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + */ + protected $next_page_token = ''; + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + */ + protected $corrected_query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $results + * A list of matched documents. The order represents the ranking. + * @type int $total_size + * The estimated total count of matched items irrespective of pagination. The + * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + * that matches. + * @type string $attribution_token + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this search, which enables accurate attribution of search model + * performance. + * @type string $next_page_token + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * @type string $corrected_query + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult::class); + $this->results = $arr; + + return $this; + } + + /** + * The estimated total count of matched items irrespective of pagination. The + * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The estimated total count of matched items irrespective of pagination. The + * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + * @return string + */ + public function getCorrectedQuery() + { + return $this->corrected_query; + } + + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + * @param string $var + * @return $this + */ + public function setCorrectedQuery($var) + { + GPBUtil::checkString($var, True); + $this->corrected_query = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php new file mode 100644 index 000000000000..552044d3bfaf --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php @@ -0,0 +1,122 @@ +google.cloud.discoveryengine.v1.SearchResponse.SearchResult + */ +class SearchResult extends \Google\Protobuf\Internal\Message +{ + /** + * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1.Document]. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + */ + protected $document = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1.Document]. + * @type \Google\Cloud\DiscoveryEngine\V1\Document $document + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1.Document]. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1.Document]. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + * @return \Google\Cloud\DiscoveryEngine\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + * @param \Google\Cloud\DiscoveryEngine\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->document = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchResult::class, \Google\Cloud\DiscoveryEngine\V1\SearchResponse_SearchResult::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php new file mode 100644 index 000000000000..e4308487b3e6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php @@ -0,0 +1,369 @@ +google.cloud.discoveryengine.v1.TransactionInfo + */ +class TransactionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $currency = ''; + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + */ + protected $transaction_id = ''; + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + */ + protected $tax = null; + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + */ + protected $cost = null; + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + */ + protected $discount_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $value + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * @type string $currency + * Required. Currency code. Use three-character ISO-4217 code. + * @type string $transaction_id + * The transaction ID with a length limit of 128 characters. + * @type float $tax + * All the taxes associated with the transaction. + * @type float $cost + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * @type float $discount_value + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getValue() + { + return isset($this->value) ? $this->value : 0.0; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkFloat($var); + $this->value = $var; + + return $this; + } + + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCurrency($var) + { + GPBUtil::checkString($var, True); + $this->currency = $var; + + return $this; + } + + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + * @return string + */ + public function getTransactionId() + { + return $this->transaction_id; + } + + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + * @param string $var + * @return $this + */ + public function setTransactionId($var) + { + GPBUtil::checkString($var, True); + $this->transaction_id = $var; + + return $this; + } + + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + * @return float + */ + public function getTax() + { + return isset($this->tax) ? $this->tax : 0.0; + } + + public function hasTax() + { + return isset($this->tax); + } + + public function clearTax() + { + unset($this->tax); + } + + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + * @param float $var + * @return $this + */ + public function setTax($var) + { + GPBUtil::checkFloat($var); + $this->tax = $var; + + return $this; + } + + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + * @return float + */ + public function getCost() + { + return isset($this->cost) ? $this->cost : 0.0; + } + + public function hasCost() + { + return isset($this->cost); + } + + public function clearCost() + { + unset($this->cost); + } + + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkFloat($var); + $this->cost = $var; + + return $this; + } + + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + * @return float + */ + public function getDiscountValue() + { + return isset($this->discount_value) ? $this->discount_value : 0.0; + } + + public function hasDiscountValue() + { + return isset($this->discount_value); + } + + public function clearDiscountValue() + { + unset($this->discount_value); + } + + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: + * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + * @param float $var + * @return $this + */ + public function setDiscountValue($var) + { + GPBUtil::checkFloat($var); + $this->discount_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php new file mode 100644 index 000000000000..5a010ca542f9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php @@ -0,0 +1,149 @@ +google.cloud.discoveryengine.v1.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to update does + * not exist and + * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new + * [Document][google.cloud.discoveryengine.v1.Document] will be created. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1\Document $document + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to update does + * not exist and + * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * @type bool $allow_missing + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new + * [Document][google.cloud.discoveryengine.v1.Document] will be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to update does + * not exist and + * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1.Document] to update does + * not exist and + * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new + * [Document][google.cloud.discoveryengine.v1.Document] will be created. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new + * [Document][google.cloud.discoveryengine.v1.Document] will be created. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php new file mode 100644 index 000000000000..745e59a0275a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1.UpdateSchemaMetadata + */ +class UpdateSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php new file mode 100644 index 000000000000..1c39456ca86b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php @@ -0,0 +1,121 @@ +google.cloud.discoveryengine.v1.UpdateSchemaRequest + */ +class UpdateSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = null; + /** + * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is + * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1\Schema $schema + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. + * @type bool $allow_missing + * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is + * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be + * created. In this situation, `update_mask` is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class); + $this->schema = $var; + + return $this; + } + + /** + * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is + * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is + * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php new file mode 100644 index 000000000000..6a4db8868aef --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php @@ -0,0 +1,1166 @@ +google.cloud.discoveryengine.v1.UserEvent + */ +class UserEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_type = ''; + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_pseudo_id = ''; + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + */ + protected $event_time = null; + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; + */ + protected $user_info = null; + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + */ + protected $direct_user_request = false; + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + */ + protected $session_id = ''; + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; + */ + protected $page_info = null; + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][]. This field enables accurate + * attribution of recommendation model performance. + * The value must be one of: + * * [PredictResponse.attribution_token][] for events that are the result of + * [RecommendationService.Recommend][]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. + * * [CompleteQueryResponse.attribution_token][] for events that are the + * result of + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass [PredictResponse.attribution_token][] as a URL + * parameter to product K's page. When recording events on product K's page, + * log the [PredictResponse.attribution_token][] to this field. + * + * Generated from protobuf field string attribution_token = 8; + */ + protected $attribution_token = ''; + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain + * a filter expression in [SearchRequest.filter][] conforming to + * https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string filter = 9; + */ + protected $filter = ''; + /** + * List of Documents associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; + */ + private $documents; + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; + */ + protected $panel = null; + /** + * Search API details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; + */ + protected $search_info = null; + /** + * CompleteQuery API details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; + */ + protected $completion_info = null; + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; + */ + protected $transaction_info = null; + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + */ + private $tag_ids; + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + */ + private $promotion_ids; + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * ` traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + */ + private $attributes; + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; + */ + protected $media_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event_type + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @type string $user_pseudo_id + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * @type \Google\Protobuf\Timestamp $event_time + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * @type \Google\Cloud\DiscoveryEngine\V1\UserInfo $user_info + * Information about the end user. + * @type bool $direct_user_request + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. + * @type string $session_id + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * as prefix. + * @type \Google\Cloud\DiscoveryEngine\V1\PageInfo $page_info + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * @type string $attribution_token + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][]. This field enables accurate + * attribution of recommendation model performance. + * The value must be one of: + * * [PredictResponse.attribution_token][] for events that are the result of + * [RecommendationService.Recommend][]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. + * * [CompleteQueryResponse.attribution_token][] for events that are the + * result of + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass [PredictResponse.attribution_token][] as a URL + * parameter to product K's page. When recording events on product K's page, + * log the [PredictResponse.attribution_token][] to this field. + * @type string $filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain + * a filter expression in [SearchRequest.filter][] conforming to + * https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * @type array<\Google\Cloud\DiscoveryEngine\V1\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents + * List of Documents associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] + * is desired. + * @type \Google\Cloud\DiscoveryEngine\V1\PanelInfo $panel + * Panel metadata associated with this user event. + * @type \Google\Cloud\DiscoveryEngine\V1\SearchInfo $search_info + * Search API details related to the event. + * This field should be set for `search` event. + * @type \Google\Cloud\DiscoveryEngine\V1\CompletionInfo $completion_info + * CompleteQuery API details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * @type \Google\Cloud\DiscoveryEngine\V1\TransactionInfo $transaction_info + * The transaction metadata (if any) associated with this user event. + * @type array|\Google\Protobuf\Internal\RepeatedField $tag_ids + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * ` traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * @type \Google\Cloud\DiscoveryEngine\V1\MediaInfo $media_info + * Media-specific info. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkString($var, True); + $this->event_type = $var; + + return $this; + } + + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; + * @return \Google\Cloud\DiscoveryEngine\V1\UserInfo|null + */ + public function getUserInfo() + { + return $this->user_info; + } + + public function hasUserInfo() + { + return isset($this->user_info); + } + + public function clearUserInfo() + { + unset($this->user_info); + } + + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; + * @param \Google\Cloud\DiscoveryEngine\V1\UserInfo $var + * @return $this + */ + public function setUserInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserInfo::class); + $this->user_info = $var; + + return $this; + } + + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + * @return bool + */ + public function getDirectUserRequest() + { + return $this->direct_user_request; + } + + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + * @param bool $var + * @return $this + */ + public function setDirectUserRequest($var) + { + GPBUtil::checkBool($var); + $this->direct_user_request = $var; + + return $this; + } + + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + * @return string + */ + public function getSessionId() + { + return $this->session_id; + } + + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + * @param string $var + * @return $this + */ + public function setSessionId($var) + { + GPBUtil::checkString($var, True); + $this->session_id = $var; + + return $this; + } + + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; + * @return \Google\Cloud\DiscoveryEngine\V1\PageInfo|null + */ + public function getPageInfo() + { + return $this->page_info; + } + + public function hasPageInfo() + { + return isset($this->page_info); + } + + public function clearPageInfo() + { + unset($this->page_info); + } + + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; + * @param \Google\Cloud\DiscoveryEngine\V1\PageInfo $var + * @return $this + */ + public function setPageInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\PageInfo::class); + $this->page_info = $var; + + return $this; + } + + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][]. This field enables accurate + * attribution of recommendation model performance. + * The value must be one of: + * * [PredictResponse.attribution_token][] for events that are the result of + * [RecommendationService.Recommend][]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. + * * [CompleteQueryResponse.attribution_token][] for events that are the + * result of + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass [PredictResponse.attribution_token][] as a URL + * parameter to product K's page. When recording events on product K's page, + * log the [PredictResponse.attribution_token][] to this field. + * + * Generated from protobuf field string attribution_token = 8; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][]. This field enables accurate + * attribution of recommendation model performance. + * The value must be one of: + * * [PredictResponse.attribution_token][] for events that are the result of + * [RecommendationService.Recommend][]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. + * * [CompleteQueryResponse.attribution_token][] for events that are the + * result of + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass [PredictResponse.attribution_token][] as a URL + * parameter to product K's page. When recording events on product K's page, + * log the [PredictResponse.attribution_token][] to this field. + * + * Generated from protobuf field string attribution_token = 8; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain + * a filter expression in [SearchRequest.filter][] conforming to + * https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string filter = 9; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain + * a filter expression in [SearchRequest.filter][] conforming to + * https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * + * Generated from protobuf field string filter = 9; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * List of Documents associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * List of Documents associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; + * @param array<\Google\Cloud\DiscoveryEngine\V1\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\DocumentInfo::class); + $this->documents = $arr; + + return $this; + } + + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; + * @return \Google\Cloud\DiscoveryEngine\V1\PanelInfo|null + */ + public function getPanel() + { + return $this->panel; + } + + public function hasPanel() + { + return isset($this->panel); + } + + public function clearPanel() + { + unset($this->panel); + } + + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; + * @param \Google\Cloud\DiscoveryEngine\V1\PanelInfo $var + * @return $this + */ + public function setPanel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\PanelInfo::class); + $this->panel = $var; + + return $this; + } + + /** + * Search API details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchInfo|null + */ + public function getSearchInfo() + { + return $this->search_info; + } + + public function hasSearchInfo() + { + return isset($this->search_info); + } + + public function clearSearchInfo() + { + unset($this->search_info); + } + + /** + * Search API details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchInfo $var + * @return $this + */ + public function setSearchInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchInfo::class); + $this->search_info = $var; + + return $this; + } + + /** + * CompleteQuery API details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; + * @return \Google\Cloud\DiscoveryEngine\V1\CompletionInfo|null + */ + public function getCompletionInfo() + { + return $this->completion_info; + } + + public function hasCompletionInfo() + { + return isset($this->completion_info); + } + + public function clearCompletionInfo() + { + unset($this->completion_info); + } + + /** + * CompleteQuery API details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; + * @param \Google\Cloud\DiscoveryEngine\V1\CompletionInfo $var + * @return $this + */ + public function setCompletionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\CompletionInfo::class); + $this->completion_info = $var; + + return $this; + } + + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; + * @return \Google\Cloud\DiscoveryEngine\V1\TransactionInfo|null + */ + public function getTransactionInfo() + { + return $this->transaction_info; + } + + public function hasTransactionInfo() + { + return isset($this->transaction_info); + } + + public function clearTransactionInfo() + { + unset($this->transaction_info); + } + + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; + * @param \Google\Cloud\DiscoveryEngine\V1\TransactionInfo $var + * @return $this + */ + public function setTransactionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\TransactionInfo::class); + $this->transaction_info = $var; + + return $this; + } + + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTagIds() + { + return $this->tag_ids; + } + + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTagIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tag_ids = $arr; + + return $this; + } + + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPromotionIds() + { + return $this->promotion_ids; + } + + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPromotionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->promotion_ids = $arr; + + return $this; + } + + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * ` traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * ` traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\CustomAttribute::class); + $this->attributes = $arr; + + return $this; + } + + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; + * @return \Google\Cloud\DiscoveryEngine\V1\MediaInfo|null + */ + public function getMediaInfo() + { + return $this->media_info; + } + + public function hasMediaInfo() + { + return isset($this->media_info); + } + + public function clearMediaInfo() + { + unset($this->media_info); + } + + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; + * @param \Google\Cloud\DiscoveryEngine\V1\MediaInfo $var + * @return $this + */ + public function setMediaInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\MediaInfo::class); + $this->media_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php new file mode 100644 index 000000000000..605cd52997db --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php @@ -0,0 +1,165 @@ +google.cloud.discoveryengine.v1.UserInfo + */ +class UserInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + */ + protected $user_id = ''; + /** + * User agent as included in the HTTP header. Required for getting + * [SearchResponse.sponsored_results][]. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + */ + protected $user_agent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user_id + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type string $user_agent + * User agent as included in the HTTP header. Required for getting + * [SearchResponse.sponsored_results][]. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] + * is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + * @return string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->user_id = $var; + + return $this; + } + + /** + * User agent as included in the HTTP header. Required for getting + * [SearchResponse.sponsored_results][]. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * User agent as included in the HTTP header. Required for getting + * [SearchResponse.sponsored_results][]. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php new file mode 100644 index 000000000000..f83195066deb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1.WriteUserEventRequest + */ +class WriteUserEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type \Google\Cloud\DiscoveryEngine\V1\UserEvent $user_event + * Required. User event to write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEventService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\UserEvent|null + */ + public function getUserEvent() + { + return $this->user_event; + } + + public function hasUserEvent() + { + return isset($this->user_event); + } + + public function clearUserEvent() + { + unset($this->user_event); + } + + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\UserEvent $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserEvent::class); + $this->user_event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php new file mode 100644 index 000000000000..da43c877edc7 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php @@ -0,0 +1,81 @@ +setDataStore($formattedDataStore) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var CompleteQueryResponse $response */ + $response = $completionServiceClient->completeQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedDataStore = CompletionServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + $query = '[QUERY]'; + + complete_query_sample($formattedDataStore, $query); +} +// [END discoveryengine_v1_generated_CompletionService_CompleteQuery_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php new file mode 100644 index 000000000000..370b946c1b49 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->createDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + $documentId = '[DOCUMENT_ID]'; + + create_document_sample($formattedParent, $documentId); +} +// [END discoveryengine_v1_generated_DocumentService_CreateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php new file mode 100644 index 000000000000..b3a222012a95 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $documentServiceClient->deleteDocument($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentServiceClient::documentName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]', + '[DOCUMENT]' + ); + + delete_document_sample($formattedName); +} +// [END discoveryengine_v1_generated_DocumentService_DeleteDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php new file mode 100644 index 000000000000..f8ca37b1d223 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->getDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentServiceClient::documentName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]', + '[DOCUMENT]' + ); + + get_document_sample($formattedName); +} +// [END discoveryengine_v1_generated_DocumentService_GetDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php new file mode 100644 index 000000000000..5956048420f9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php @@ -0,0 +1,96 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentServiceClient->importDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + + import_documents_sample($formattedParent); +} +// [END discoveryengine_v1_generated_DocumentService_ImportDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php new file mode 100644 index 000000000000..5cfc05bf2067 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php @@ -0,0 +1,88 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentServiceClient->listDocuments($request); + + /** @var Document $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + + list_documents_sample($formattedParent); +} +// [END discoveryengine_v1_generated_DocumentService_ListDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php new file mode 100644 index 000000000000..5763c00bd36c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php @@ -0,0 +1,109 @@ +setParent($formattedParent) + ->setFilter($filter); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentServiceClient->purgeDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PurgeDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + $filter = '[FILTER]'; + + purge_documents_sample($formattedParent, $filter); +} +// [END discoveryengine_v1_generated_DocumentService_PurgeDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php new file mode 100644 index 000000000000..fec89dedb0b0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php @@ -0,0 +1,59 @@ +setDocument($document); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->updateDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1_generated_DocumentService_UpdateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php new file mode 100644 index 000000000000..7923a6496b81 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->createSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schema $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schemaId = '[SCHEMA_ID]'; + + create_schema_sample($formattedParent, $schemaId); +} +// [END discoveryengine_v1_generated_SchemaService_CreateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php new file mode 100644 index 000000000000..03c17c31e10d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->deleteSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SchemaServiceClient::schemaName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SCHEMA]' + ); + + delete_schema_sample($formattedName); +} +// [END discoveryengine_v1_generated_SchemaService_DeleteSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php new file mode 100644 index 000000000000..6781fce462c6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Schema $response */ + $response = $schemaServiceClient->getSchema($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SchemaServiceClient::schemaName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SCHEMA]' + ); + + get_schema_sample($formattedName); +} +// [END discoveryengine_v1_generated_SchemaService_GetSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php new file mode 100644 index 000000000000..aef951caa239 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $schemaServiceClient->listSchemas($request); + + /** @var Schema $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + + list_schemas_sample($formattedParent); +} +// [END discoveryengine_v1_generated_SchemaService_ListSchemas_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php new file mode 100644 index 000000000000..c424ef74ac30 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php @@ -0,0 +1,71 @@ +setSchema($schema); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->updateSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schema $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1_generated_SchemaService_UpdateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php new file mode 100644 index 000000000000..86e6fefc96db --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php @@ -0,0 +1,84 @@ +setServingConfig($formattedServingConfig); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $searchServiceClient->search($request); + + /** @var SearchResult $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedServingConfig = SearchServiceClient::servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + + search_sample($formattedServingConfig); +} +// [END discoveryengine_v1_generated_SearchService_Search_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php new file mode 100644 index 000000000000..e8a5941651f6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var HttpBody $response */ + $response = $userEventServiceClient->collectUserEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = '[USER_EVENT]'; + + collect_user_event_sample($formattedParent, $userEvent); +} +// [END discoveryengine_v1_generated_UserEventService_CollectUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php new file mode 100644 index 000000000000..15b427ef0d8b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php @@ -0,0 +1,144 @@ + Men > Jeans + * + * Retail-related values: + * + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * + * Media-related values: + * + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @param string $inlineSourceUserEventsUserPseudoId A unique identifier for tracking visitors. + * + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * @param string $formattedParent Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * Please see {@see UserEventServiceClient::dataStoreName()} for help formatting this field. + */ +function import_user_events_sample( + string $inlineSourceUserEventsEventType, + string $inlineSourceUserEventsUserPseudoId, + string $formattedParent +): void { + // Create a client. + $userEventServiceClient = new UserEventServiceClient(); + + // Prepare the request message. + $userEvent = (new UserEvent()) + ->setEventType($inlineSourceUserEventsEventType) + ->setUserPseudoId($inlineSourceUserEventsUserPseudoId); + $inlineSourceUserEvents = [$userEvent,]; + $inlineSource = (new InlineSource()) + ->setUserEvents($inlineSourceUserEvents); + $request = (new ImportUserEventsRequest()) + ->setInlineSource($inlineSource) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $userEventServiceClient->importUserEvents($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportUserEventsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $inlineSourceUserEventsEventType = '[EVENT_TYPE]'; + $inlineSourceUserEventsUserPseudoId = '[USER_PSEUDO_ID]'; + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + + import_user_events_sample( + $inlineSourceUserEventsEventType, + $inlineSourceUserEventsUserPseudoId, + $formattedParent + ); +} +// [END discoveryengine_v1_generated_UserEventService_ImportUserEvents_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php new file mode 100644 index 000000000000..6cbcc36d4686 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php @@ -0,0 +1,117 @@ + Men > Jeans + * + * Retail-related values: + * + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * + * Media-related values: + * + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @param string $userEventUserPseudoId A unique identifier for tracking visitors. + * + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + */ +function write_user_event_sample( + string $formattedParent, + string $userEventEventType, + string $userEventUserPseudoId +): void { + // Create a client. + $userEventServiceClient = new UserEventServiceClient(); + + // Prepare the request message. + $userEvent = (new UserEvent()) + ->setEventType($userEventEventType) + ->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var UserEvent $response */ + $response = $userEventServiceClient->writeUserEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEventEventType = '[EVENT_TYPE]'; + $userEventUserPseudoId = '[USER_PSEUDO_ID]'; + + write_user_event_sample($formattedParent, $userEventEventType, $userEventUserPseudoId); +} +// [END discoveryengine_v1_generated_UserEventService_WriteUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php new file mode 100644 index 000000000000..12f9f36d94ff --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php @@ -0,0 +1,280 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/completion_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/completion_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/completion_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/completion_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Completes the specified user input with keyword suggestions. + * + * The async variant is {@see self::completeQueryAsync()} . + * + * @example samples/V1/CompletionServiceClient/complete_query.php + * + * @param CompleteQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompleteQueryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse + { + return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php new file mode 100644 index 000000000000..a0ef32e0ae3b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php @@ -0,0 +1,584 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/document_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/document_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/document_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/document_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a branch + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted branch resource. + */ + public static function branchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('branch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + */ + public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_collection_data_store_branch resource. + */ + public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + */ + public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_data_store_branch resource. + */ + public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + */ + public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a [Document][google.cloud.discoveryengine.v1.Document]. + * + * The async variant is {@see self::createDocumentAsync()} . + * + * @example samples/V1/DocumentServiceClient/create_document.php + * + * @param CreateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); + } + + /** + * Deletes a [Document][google.cloud.discoveryengine.v1.Document]. + * + * The async variant is {@see self::deleteDocumentAsync()} . + * + * @example samples/V1/DocumentServiceClient/delete_document.php + * + * @param DeleteDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); + } + + /** + * Gets a [Document][google.cloud.discoveryengine.v1.Document]. + * + * The async variant is {@see self::getDocumentAsync()} . + * + * @example samples/V1/DocumentServiceClient/get_document.php + * + * @param GetDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); + } + + /** + * Bulk import of multiple + * [Document][google.cloud.discoveryengine.v1.Document]s. Request processing + * may be synchronous. Non-existing items will be created. + * + * Note: It is possible for a subset of the + * [Document][google.cloud.discoveryengine.v1.Document]s to be successfully + * updated. + * + * The async variant is {@see self::importDocumentsAsync()} . + * + * @example samples/V1/DocumentServiceClient/import_documents.php + * + * @param ImportDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); + } + + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1.Document]s. + * + * The async variant is {@see self::listDocumentsAsync()} . + * + * @example samples/V1/DocumentServiceClient/list_documents.php + * + * @param ListDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDocuments', $request, $callOptions); + } + + /** + * Permanently deletes all selected + * [Document][google.cloud.discoveryengine.v1.Document]s in a branch. + * + * This process is asynchronous. Depending on the number of + * [Document][google.cloud.discoveryengine.v1.Document]s to be deleted, this + * operation can take hours to complete. Before the delete operation + * completes, some [Document][google.cloud.discoveryengine.v1.Document]s might + * still be returned by + * [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + * or + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + * + * To get a list of the [Document][google.cloud.discoveryengine.v1.Document]s + * to be deleted, set + * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] + * to false. + * + * The async variant is {@see self::purgeDocumentsAsync()} . + * + * @example samples/V1/DocumentServiceClient/purge_documents.php + * + * @param PurgeDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function purgeDocuments(PurgeDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PurgeDocuments', $request, $callOptions)->wait(); + } + + /** + * Updates a [Document][google.cloud.discoveryengine.v1.Document]. + * + * The async variant is {@see self::updateDocumentAsync()} . + * + * @example samples/V1/DocumentServiceClient/update_document.php + * + * @param UpdateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php new file mode 100644 index 000000000000..b220578da52c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php @@ -0,0 +1,496 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/schema_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/schema_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/schema_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/schema_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_collection_data_store_schema resource. + */ + public static function projectLocationCollectionDataStoreSchemaName(string $project, string $location, string $collection, string $dataStore, string $schema): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_data_store_schema resource. + */ + public static function projectLocationDataStoreSchemaName(string $project, string $location, string $dataStore, string $schema): string + { + return self::getPathTemplate('projectLocationDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a schema + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted schema resource. + */ + public static function schemaName(string $project, string $location, string $dataStore, string $schema): string + { + return self::getPathTemplate('schema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreSchema: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreSchema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} + * - schema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. + * + * The async variant is {@see self::createSchemaAsync()} . + * + * @example samples/V1/SchemaServiceClient/create_schema.php + * + * @param CreateSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSchema(CreateSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSchema', $request, $callOptions)->wait(); + } + + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. + * + * The async variant is {@see self::deleteSchemaAsync()} . + * + * @example samples/V1/SchemaServiceClient/delete_schema.php + * + * @param DeleteSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSchema(DeleteSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSchema', $request, $callOptions)->wait(); + } + + /** + * Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. + * + * The async variant is {@see self::getSchemaAsync()} . + * + * @example samples/V1/SchemaServiceClient/get_schema.php + * + * @param GetSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Schema + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSchema(GetSchemaRequest $request, array $callOptions = []): Schema + { + return $this->startApiCall('GetSchema', $request, $callOptions)->wait(); + } + + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1.Schema]s. + * + * The async variant is {@see self::listSchemasAsync()} . + * + * @example samples/V1/SchemaServiceClient/list_schemas.php + * + * @param ListSchemasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSchemas(ListSchemasRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSchemas', $request, $callOptions); + } + + /** + * Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. + * + * The async variant is {@see self::updateSchemaAsync()} . + * + * @example samples/V1/SchemaServiceClient/update_schema.php + * + * @param UpdateSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSchema(UpdateSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSchema', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php new file mode 100644 index 000000000000..f961a6a73364 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php @@ -0,0 +1,354 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/search_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/search_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/search_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/search_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a branch + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted branch resource. + */ + public static function branchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('branch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_collection_data_store_branch resource. + */ + public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_collection_data_store_serving_config resource. + */ + public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_data_store_branch resource. + */ + public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_data_store_serving_config resource. + */ + public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted serving_config resource. + */ + public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('servingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Performs a search. + * + * The async variant is {@see self::searchAsync()} . + * + * @example samples/V1/SearchServiceClient/search.php + * + * @param SearchRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function search(SearchRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('Search', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php new file mode 100644 index 000000000000..ad1c1cf77e1d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php @@ -0,0 +1,456 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/user_event_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/user_event_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/user_event_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/user_event_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + */ + public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + */ + public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + */ + public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Writes a single user event from the browser. This uses a GET request to + * due to browser restriction of POST-ing to a 3rd party domain. + * + * This method is used only by the Discovery Engine API JavaScript pixel and + * Google Tag Manager. Users should not call this method directly. + * + * The async variant is {@see self::collectUserEventAsync()} . + * + * @example samples/V1/UserEventServiceClient/collect_user_event.php + * + * @param CollectUserEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HttpBody + * + * @throws ApiException Thrown if the API call fails. + */ + public function collectUserEvent(CollectUserEventRequest $request, array $callOptions = []): HttpBody + { + return $this->startApiCall('CollectUserEvent', $request, $callOptions)->wait(); + } + + /** + * Bulk import of User events. Request processing might be + * synchronous. Events that already exist are skipped. + * Use this method for backfilling historical user events. + * + * Operation.response is of type ImportResponse. Note that it is + * possible for a subset of the items to be successfully inserted. + * Operation.metadata is of type ImportMetadata. + * + * The async variant is {@see self::importUserEventsAsync()} . + * + * @example samples/V1/UserEventServiceClient/import_user_events.php + * + * @param ImportUserEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importUserEvents(ImportUserEventsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportUserEvents', $request, $callOptions)->wait(); + } + + /** + * Writes a single user event. + * + * The async variant is {@see self::writeUserEventAsync()} . + * + * @example samples/V1/UserEventServiceClient/write_user_event.php + * + * @param WriteUserEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserEvent + * + * @throws ApiException Thrown if the API call fails. + */ + public function writeUserEvent(WriteUserEventRequest $request, array $callOptions = []): UserEvent + { + return $this->startApiCall('WriteUserEvent', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php new file mode 100644 index 000000000000..1b7ae376d481 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.discoveryengine.v1.CompletionService' => [ + 'CompleteQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'data_store', + 'fieldAccessors' => [ + 'getDataStore', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php new file mode 100644 index 000000000000..2d74bb63cdd9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php @@ -0,0 +1,134 @@ + [ + 'google.cloud.discoveryengine.v1.CompletionService' => [ + 'CompleteQuery' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{data_store=projects/*/locations/*/dataStores/*}:completeQuery', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery', + ], + ], + 'placeholders' => [ + 'data_store' => [ + 'getters' => [ + 'getDataStore', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json new file mode 100644 index 000000000000..677129d5b9a3 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json @@ -0,0 +1,81 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1.DocumentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CreateDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ImportDocuments": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListDocuments": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "PurgeDocuments": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php new file mode 100644 index 000000000000..4b86a66c0b39 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php @@ -0,0 +1,123 @@ + [ + 'google.cloud.discoveryengine.v1.DocumentService' => [ + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\PurgeDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\PurgeDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\ListDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'document.name', + 'fieldAccessors' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php new file mode 100644 index 000000000000..83846f790df1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php @@ -0,0 +1,251 @@ + [ + 'google.cloud.discoveryengine.v1.DocumentService' => [ + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', + 'body' => 'document', + 'queryParams' => [ + 'document_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'document_id', + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + 'body' => 'document', + ], + ], + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json new file mode 100644 index 000000000000..1a3d7794fef9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1.SchemaService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListSchemas": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php new file mode 100644 index 000000000000..88a83b955135 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php @@ -0,0 +1,106 @@ + [ + 'google.cloud.discoveryengine.v1.SchemaService' => [ + 'CreateSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\Schema', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\CreateSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\DeleteSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\Schema', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\UpdateSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'schema.name', + 'fieldAccessors' => [ + 'getSchema', + 'getName', + ], + ], + ], + ], + 'GetSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Schema', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSchemas' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSchemas', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\ListSchemasResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreSchema' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreSchema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', + 'schema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php new file mode 100644 index 000000000000..9199afbb26aa --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php @@ -0,0 +1,213 @@ + [ + 'google.cloud.discoveryengine.v1.SchemaService' => [ + 'CreateSchema' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/schemas', + 'body' => 'schema', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', + 'body' => 'schema', + 'queryParams' => [ + 'schema_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'schema_id', + ], + ], + 'DeleteSchema' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSchema' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSchemas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/schemas', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSchema' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}', + 'body' => 'schema', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + 'body' => 'schema', + ], + ], + 'placeholders' => [ + 'schema.name' => [ + 'getters' => [ + 'getSchema', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json new file mode 100644 index 000000000000..5e8091122348 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1.SearchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 5000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000, + "total_timeout_millis": 5000 + } + }, + "methods": { + "Search": { + "timeout_millis": 5000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php new file mode 100644 index 000000000000..256f56b1135d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.discoveryengine.v1.SearchService' => [ + 'Search' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\SearchResponse', + 'headerParams' => [ + [ + 'keyName' => 'serving_config', + 'fieldAccessors' => [ + 'getServingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php new file mode 100644 index 000000000000..d35676a28f96 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php @@ -0,0 +1,136 @@ + [ + 'google.cloud.discoveryengine.v1.SearchService' => [ + 'Search' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'serving_config' => [ + 'getters' => [ + 'getServingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json new file mode 100644 index 000000000000..2fc3ec52e009 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json @@ -0,0 +1,61 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1.UserEventService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CollectUserEvent": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ImportUserEvents": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "WriteUserEvent": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php new file mode 100644 index 000000000000..a69ef38de65c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php @@ -0,0 +1,59 @@ + [ + 'google.cloud.discoveryengine.v1.UserEventService' => [ + 'ImportUserEvents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportUserEventsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportUserEventsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CollectUserEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Api\HttpBody', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'WriteUserEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\UserEvent', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php new file mode 100644 index 000000000000..260cb8d7e045 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php @@ -0,0 +1,172 @@ + [ + 'google.cloud.discoveryengine.v1.UserEventService' => [ + 'CollectUserEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportUserEvents' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'WriteUserEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:write', + 'body' => 'user_event', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write', + 'body' => 'user_event', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php new file mode 100644 index 000000000000..9bf8f0dbda3e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php @@ -0,0 +1,161 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CompletionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CompletionServiceClient($options); + } + + /** @test */ + public function completeQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + $response = $gapicClient->completeQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.CompletionService/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getDataStore(); + $this->assertProtobufEquals($formattedDataStore, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + try { + $gapicClient->completeQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + $response = $gapicClient->completeQueryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.CompletionService/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getDataStore(); + $this->assertProtobufEquals($formattedDataStore, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php new file mode 100644 index 000000000000..dd2f0f7d8368 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php @@ -0,0 +1,732 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DocumentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DocumentServiceClient($options); + } + + /** @test */ + public function createDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + $response = $gapicClient->createDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + try { + $gapicClient->createDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new DeleteDocumentRequest()) + ->setName($formattedName); + $gapicClient->deleteDocument($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/DeleteDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new DeleteDocumentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new GetDocumentRequest()) + ->setName($formattedName); + $response = $gapicClient->getDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new GetDocumentRequest()) + ->setName($formattedName); + try { + $gapicClient->getDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ImportDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ImportDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $documentsElement = new Document(); + $documents = [ + $documentsElement, + ]; + $expectedResponse = new ListDocumentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDocuments($documents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ListDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDocuments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ListDocumentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDocuments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $purgeCount = 575305851; + $expectedResponse = new PurgeDocumentsResponse(); + $expectedResponse->setPurgeCount($purgeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $filter = 'filter-1274492040'; + $request = (new PurgeDocumentsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->purgeDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/PurgeDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function purgeDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $filter = 'filter-1274492040'; + $request = (new PurgeDocumentsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->purgeDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document); + $response = $gapicClient->updateDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/UpdateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document); + try { + $gapicClient->updateDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + $response = $gapicClient->createDocumentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php new file mode 100644 index 000000000000..2ada41b6d931 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php @@ -0,0 +1,669 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SchemaServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SchemaServiceClient($options); + } + + /** @test */ + public function createSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/CreateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $actualValue = $actualApiRequestObject->getSchemaId(); + $this->assertProtobufEquals($schemaId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new DeleteSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/DeleteSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new DeleteSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonSchema = 'jsonSchema-1150390056'; + $name2 = 'name2-1052831874'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new GetSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->getSchema($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/GetSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSchemaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new GetSchemaRequest()) + ->setName($formattedName); + try { + $gapicClient->getSchema($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchemasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $schemasElement = new Schema(); + $schemas = [ + $schemasElement, + ]; + $expectedResponse = new ListSchemasResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSchemas($schemas); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSchemasRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSchemas($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/ListSchemas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchemasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSchemasRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSchemas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $schema = new Schema(); + $request = (new UpdateSchemaRequest()) + ->setSchema($schema); + $response = $gapicClient->updateSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/UpdateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $schema = new Schema(); + $request = (new UpdateSchemaRequest()) + ->setSchema($schema); + $response = $gapicClient->updateSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSchemaAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchemaAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/CreateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $actualValue = $actualApiRequestObject->getSchemaId(); + $this->assertProtobufEquals($schemaId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php new file mode 100644 index 000000000000..b2cf8e0c3e95 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php @@ -0,0 +1,184 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SearchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SearchServiceClient($options); + } + + /** @test */ + public function searchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $attributionToken = 'attributionToken-729411015'; + $nextPageToken = ''; + $correctedQuery = 'correctedQuery107869074'; + $resultsElement = new SearchResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCorrectedQuery($correctedQuery); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + $response = $gapicClient->search($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SearchService/Search', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + try { + $gapicClient->search($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $attributionToken = 'attributionToken-729411015'; + $nextPageToken = ''; + $correctedQuery = 'correctedQuery107869074'; + $resultsElement = new SearchResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCorrectedQuery($correctedQuery); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + $response = $gapicClient->searchAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.SearchService/Search', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php new file mode 100644 index 000000000000..f090aa0a36a5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php @@ -0,0 +1,401 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return UserEventServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new UserEventServiceClient($options); + } + + /** @test */ + public function collectUserEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $contentType = 'contentType831846208'; + $data = '-86'; + $expectedResponse = new HttpBody(); + $expectedResponse->setContentType($contentType); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->collectUserEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/CollectUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function collectUserEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + try { + $gapicClient->collectUserEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importUserEventsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importUserEventsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $joinedEventsCount = 720068705; + $unjoinedEventsCount = 512159846; + $expectedResponse = new ImportUserEventsResponse(); + $expectedResponse->setJoinedEventsCount($joinedEventsCount); + $expectedResponse->setUnjoinedEventsCount($unjoinedEventsCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importUserEventsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $inlineSource = new InlineSource(); + $inlineSourceUserEvents = []; + $inlineSource->setUserEvents($inlineSourceUserEvents); + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ImportUserEventsRequest()) + ->setInlineSource($inlineSource) + ->setParent($formattedParent); + $response = $gapicClient->importUserEvents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/ImportUserEvents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInlineSource(); + $this->assertProtobufEquals($inlineSource, $actualValue); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importUserEventsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importUserEventsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $inlineSource = new InlineSource(); + $inlineSourceUserEvents = []; + $inlineSource->setUserEvents($inlineSourceUserEvents); + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ImportUserEventsRequest()) + ->setInlineSource($inlineSource) + ->setParent($formattedParent); + $response = $gapicClient->importUserEvents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function writeUserEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $eventType = 'eventType984376767'; + $userPseudoId = 'userPseudoId-1850666040'; + $directUserRequest = false; + $sessionId = 'sessionId1661853540'; + $attributionToken = 'attributionToken-729411015'; + $filter = 'filter-1274492040'; + $expectedResponse = new UserEvent(); + $expectedResponse->setEventType($eventType); + $expectedResponse->setUserPseudoId($userPseudoId); + $expectedResponse->setDirectUserRequest($directUserRequest); + $expectedResponse->setSessionId($sessionId); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setFilter($filter); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->writeUserEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/WriteUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeUserEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + try { + $gapicClient->writeUserEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function collectUserEventAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $contentType = 'contentType831846208'; + $data = '-86'; + $expectedResponse = new HttpBody(); + $expectedResponse->setContentType($contentType); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->collectUserEventAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/CollectUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..7c51f9521ad5107b49e9c1feb9d9e1640a908ea2 GIT binary patch literal 1919 zcmb7E&2G~`5XNbtbU~`{sS=l^1sWu3_9~2E`obU*gLuvDX?jO9Ot!C%dEeuU%rb6)OK*~V`ZWzg|=k|CS$|0zaAO>83 zJKPCCGZ#@}DI5b%h+r|K2@8R?59`nIyvH>2+XlyP)X#nsJRq04>%AZRPWIOGxxon zNbJKNoiIDhTZ3)!J3@mJEb^O>hKeUzszY@3yaDKGLvu^@UYRzB<9%8!IC|b0l6zFE z3{GdKRDsTv*fqR!fbn$Y|D$iUg!?a{ycBO%&@A56^WZTr+1Gl#DcPrZ#nmZ%o@|SJ zC1m@5@7CTdA{_G?oVnNF6t7`pM6Q|^4q0U1AS*GFjk9>&qE^*@ zJ2|YBhq*r+8UH0?vgZ8D!{y?zewi#Gg!!@2#x_}NWT}>MO>4!2OoM%$ENd8P%)V4z zwb#gs$l?H0x?Vwpwc(PhuTxMR(Un`4{g0UMI zoZMQh#`cFrA#wIan7YU`+x$naliCl9R4=HsIbm);S(Mp1#oBKd1(;QXjhSuEE$yWC zr9$psP{internalAddGeneratedFile( + ' +� + +)o+4XtTST zos9^UUwGg*@XRCp6aE2jJog{)f;h9cI2XVq57Bt`obTMebLM>UrGMnZ7U@!#a#K*7 zOizh8qQvK(@GQ?E({MJUoLJtm&m78CLfU=O>yJsNt&iVF)xZn6MKv<_ytzZ`mg9wX z-DZL1olt&C-8pk<{bXlKg;}>e7cT=-Fwa#Z69BGxOatGvDCrJbhbU#6!Zf-Onz1j@ zjP`jnOyxlAzAVc%nndt_!h0Y!kz zva`^&qOcf)}4i679=_9o1(6r>U5Io!r{ z2j-jxl{HeRl^dV`Zxe?xfbtjsedS^z1FaMhzueeN(b6oaS$$=I1!V_rQ`e4FZmy(K zeG0`msJCHbG;WSNlb5~GptG+Z=$-bx8_GJA_1!n^disLL5N!XBo0 zE6=HvaUaU2YaMxfBItJ_B6vyq5pgJ@ zXHhC3JCK>VTCu9b{pFhASt=?IU;~pWj}zOo!ei=+08JE--S5J>iOD*l*_YT%l|pHZ z3cBluLfT~Vkocv;tpqO;zD`FZu2p}}op(9ylr})rjb~=d4RxjTW?nzLq3otLle3}R z_;4kFs6MFt1j-htI2z*Clhfe8yR}tua{=O5cK*#IuIt3Tbnbn|n5y{(V-`>#5~uRFc2-s}95-|9yDfEw)sYCGKr zI?;Ba#{0l;sg#kd4QG2pEN9^2AlHyL`43_^O^fg}?E;{t#e&nD*wMm!yq&#AAIER< W(i4tE#}(s>=R1;&AK3*g0R9Gp79|=0 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ConversationalSearchService.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ConversationalSearchService.php new file mode 100644 index 000000000000..5f1b34d1c330 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ConversationalSearchService.php @@ -0,0 +1,79 @@ +internalAddGeneratedFile( + ' +� +Ggoogle/cloud/discoveryengine/v1beta/conversational_search_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/discoveryengine/v1beta/conversation.proto8google/cloud/discoveryengine/v1beta/search_service.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"� +ConverseConversationRequestA +name ( B3�A�A- ++discoveryengine.googleapis.com/ConversationB +query ( 2..google.cloud.discoveryengine.v1beta.TextInputB�AI +serving_config ( B1�A. +,discoveryengine.googleapis.com/ServingConfigG + conversation ( 21.google.cloud.discoveryengine.v1beta.Conversation + safe_search ("� +ConverseConversationResponse9 +reply ( 2*.google.cloud.discoveryengine.v1beta.ReplyG + conversation ( 21.google.cloud.discoveryengine.v1beta.ConversationX +search_results ( 2@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult"� +CreateConversationRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStoreL + conversation ( 21.google.cloud.discoveryengine.v1beta.ConversationB�A"� +UpdateConversationRequestL + conversation ( 21.google.cloud.discoveryengine.v1beta.ConversationB�A/ + update_mask ( 2.google.protobuf.FieldMask"^ +DeleteConversationRequestA +name ( B3�A�A- ++discoveryengine.googleapis.com/Conversation"[ +GetConversationRequestA +name ( B3�A�A- ++discoveryengine.googleapis.com/Conversation"� +ListConversationsRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStore + page_size ( + +page_token (  +filter (  +order_by ( "~ +ListConversationsResponseH + conversations ( 21.google.cloud.discoveryengine.v1beta.Conversation +next_page_token ( 2� +ConversationalSearchService� +ConverseConversation@.google.cloud.discoveryengine.v1beta.ConverseConversationRequestA.google.cloud.discoveryengine.v1beta.ConverseConversationResponse"�����"K/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse:*Z^"Y/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:*�A +name,query� +CreateConversation>.google.cloud.discoveryengine.v1beta.CreateConversationRequest1.google.cloud.discoveryengine.v1beta.Conversation"�����"B/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations: conversationZ`"P/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations: conversation�Aparent,conversation� +DeleteConversation>.google.cloud.discoveryengine.v1beta.DeleteConversationRequest.google.protobuf.Empty"�����*B/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR*P/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}�Aname� +UpdateConversation>.google.cloud.discoveryengine.v1beta.UpdateConversationRequest1.google.cloud.discoveryengine.v1beta.Conversation"�����2O/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}: conversationZm2]/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}: conversation�Aconversation,update_mask� +GetConversation;.google.cloud.discoveryengine.v1beta.GetConversationRequest1.google.cloud.discoveryengine.v1beta.Conversation"�����B/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZRP/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}�Aname� +ListConversations=.google.cloud.discoveryengine.v1beta.ListConversationsRequest>.google.cloud.discoveryengine.v1beta.ListConversationsResponse"�����B/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversationsZRP/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations�AparentR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +\'com.google.cloud.discoveryengine.v1betaB ConversationalSearchServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Document.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Document.php new file mode 100644 index 0000000000000000000000000000000000000000..9b5ecdc68c94dbf0b62bd404f717d31a224a32e1 GIT binary patch literal 1838 zcmbtV-A>d%6qe<82MwWIh{TIgj4X+^0po>5G%UNU#0V=85>1oMbUM2X>2{jw6oX{r zJE-viy!1s(d0_hzT3XTEd3Z_a#u`aC{}(L8Rjh)JSYfc;~v4j7K5 zP=bmO`)Rw)B&MPp^N>j!UR{ zAxRQk%MsBD!tjezKjaiAiYWNI$CDP1xZ)(_?}6JYZj&%!u=!$cJB_H~BEovZc0^fa z5gSaMdoLEC#VRg(YifBw8gDaFOhzR1YAm6W$4ba1q`Gd0slKQ>Qd!K)YB=7;71N{Z zUTAU^E19yh)iIV#r7~K{`qluw{>uAYi3FHdaW{31@vO!ZG!rn%k66$;%X2KNcNtGj zVR-H(8ZRmUYf0X<{A0zEjMQ~teFF`rk{d3W2<0yCvX(lI3nj{Zg6@~n>DtE<@)pjY zrcoLWF|om)oPwOy2JH_SRf%(wuX;`>D0qU1AXY4Ujy|_txUvkQdJR0`q38ILL?Ads z%?dJepV5i=vS)p`Y8^1r5c)CY2M_<-Ky?g_=(ek$wK^cdRc4@iqtL0TO{_We_O%(A zd~UUp9dW_ILFK~4e|O~AUpaR!vH!I+RomQM-`=n9ys2+BHn-~EO7o4(*6qyJ?OFj+ z&pr^gvGpHCmY2K#!2V612mY_WB&VhO2F`UeJl8!3=(;A+AA>Ve;?Y9iT^<;FJ>$lg OI&qe1{IZ972>k*h-Dxra literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php new file mode 100644 index 000000000000..0bf27ce20b89 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php @@ -0,0 +1,69 @@ +internalAddGeneratedFile( + ' +� +:google/cloud/discoveryengine/v1beta/document_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto7google/cloud/discoveryengine/v1beta/import_config.proto6google/cloud/discoveryengine/v1beta/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S +GetDocumentRequest= +name ( B/�A�A) +\'discoveryengine.googleapis.com/Document"| +ListDocumentsRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/Branch + page_size ( + +page_token ( "r +ListDocumentsResponse@ + documents ( 2-.google.cloud.discoveryengine.v1beta.Document +next_page_token ( "� +CreateDocumentRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/BranchD +document ( 2-.google.cloud.discoveryengine.v1beta.DocumentB�A + document_id ( B�A"t +UpdateDocumentRequestD +document ( 2-.google.cloud.discoveryengine.v1beta.DocumentB�A + allow_missing ("V +DeleteDocumentRequest= +name ( B/�A�A) +\'discoveryengine.googleapis.com/Document2� +DocumentService� + GetDocument7.google.cloud.discoveryengine.v1beta.GetDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZYW/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� + ListDocuments9.google.cloud.discoveryengine.v1beta.ListDocumentsRequest:.google.cloud.discoveryengine.v1beta.ListDocumentsResponse"�����I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZYW/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents�Aparent� +CreateDocument:.google.cloud.discoveryengine.v1beta.CreateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����"I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZc"W/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:document�Aparent,document,document_id� +UpdateDocument:.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����2R/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZl2`/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document� +DeleteDocument:.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.google.protobuf.Empty"�����*I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZY*W/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� +ImportDocuments;.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.google.longrunning.Operation"�����"P/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Zc"^/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*�Az +;google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata� +PurgeDocuments:.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.google.longrunning.Operation"�����"O/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge:*Zb"]/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge:*�Ax +:google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse:google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +\'com.google.cloud.discoveryengine.v1betaBDocumentServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..6188c67919fe80b3bd206e8b6d8d74d682f8f790 GIT binary patch literal 3905 zcmdT{PjlNu6tA5&6R(>lRcYdeVJe(LTp%)a8UCmQh;1d&Ok$^w(*Z^^8d+L9TVzS> zN*MyvGj~p$xzW$S2Vl7H6*zO@&Z%#;l9SkO5aj^m;>_y3-~0dDeII@t90h1q-o_rL zR)`(BcOr*JSPrNk`nK=Ny{O;ERJQ$LKwL}}S#GxFR=X=}O}+ans4_pIHdf_jigfG4B>j49dM z42ZEsuTt?HkqapUf>`q(=cgQf+j{g?ks9IeD zJr`QTAiFP}z%~w`og$W9r+X4$qX~00T_tX&^^Zu>I-8C&>Xa=Qw#ulsywYpv=Oy&s z3r?A|DioD?Je9HWRK$3$+)B``fK+KxdoiUewJe66q`-;JJ6UuhsG^B^856DBiB`-G zFj>_wtyLnhoCwgsuJYN5Sn^>h`4B?Zt3V=HoR>d9g>9Q1#5^S}BSgF)3eAWTR?5jU zl|p^yx6QnC0~I;(n9M%HL#vdRbCp8*ryROgCxeF(P+0=-Cb||_Gz2p7J(F80T>;Tz z?Ybh&E8M)oi@tM7k`RJ89%DN+i38RElY77oF&v-8c7z8v(OhWtT+BshxTrW@MhgR* znGh;a>A-XdEnSX*#yp;lRf?!EaRx_ zARZ8=@0Gv3jFyG!Xv|m#e;I*@)I;;cbAi@PK@V}RiZwk=z(qZ#JO@c-NL*7m znHb>NDAtrr21ca@lond(kpXy3Pf}lb>Wa1dnV`;B9`HUvvyfcqRgt#(+t4_FZoYvk z;{zpH0p^G)aC26n8>|Dk5wNt2u3}z`>f+R-l*R)ystD4Yh@3ZmvG#(IOE04v zk9}xCM{oy&d`3_f-Y7HDE9hqAP5aD?KU01>C8G4*AyrY)rWmHzzVvZ+a%_(au-QcJX=M#J6faNYUsQAW>;^w%)NF~GY?w_`&vWa z(zWK|C20W_^;V;!?P;y<=I&xnnnRbj4tIAK^Jm!cyUFo{SM$G1j`i>J$XJ7WCriHS z$qPX|4&n#$e(v*!Vjhzh4Zp$${=`xT*ITmJjkR*ndoXeGLw=#DA2iyJw9aQ*Yg=z= zPxGtW@sg)B_>!kI($k+Bb!IQ)?@D4%*~wx_u{k|KPY`+r3WF14 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php new file mode 100644 index 000000000000..623f49eb0a27 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +� +6google/cloud/discoveryengine/v1beta/purge_config.proto#google.cloud.discoveryengine.v1betagoogle/api/resource.protogoogle/protobuf/timestamp.proto"z +PurgeDocumentsRequest= +parent ( B-�A�A\' +%discoveryengine.googleapis.com/Branch +filter ( B�A +force ("q +PurgeDocumentsResponse + purge_count (B + purge_sample ( B,�A) +\'discoveryengine.googleapis.com/Document"� +PurgeDocumentsMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp + success_count ( + failure_count (B� +\'com.google.cloud.discoveryengine.v1betaBPurgeConfigProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php new file mode 100644 index 000000000000..2b734d1177c2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php @@ -0,0 +1,65 @@ +internalAddGeneratedFile( + ' +� +@google/cloud/discoveryengine/v1beta/recommendation_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto4google/cloud/discoveryengine/v1beta/user_event.protogoogle/protobuf/struct.proto"� +RecommendRequestL +serving_config ( B4�A�A. +,discoveryengine.googleapis.com/ServingConfigG + +user_event ( 2..google.cloud.discoveryengine.v1beta.UserEventB�A + page_size ( +filter (  + validate_only (Q +params ( 2A.google.cloud.discoveryengine.v1beta.RecommendRequest.ParamsEntryZ + user_labels ( 2E.google.cloud.discoveryengine.v1beta.RecommendRequest.UserLabelsEntryE + ParamsEntry +key ( % +value ( 2.google.protobuf.Value:81 +UserLabelsEntry +key (  +value ( :8"� +RecommendResponse\\ +results ( 2K.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult +attribution_token (  + missing_ids (  + validate_only (� +RecommendationResult + +id ( ? +document ( 2-.google.cloud.discoveryengine.v1beta.Documentk +metadata ( 2Y.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.MetadataEntryG + MetadataEntry +key ( % +value ( 2.google.protobuf.Value:82� +RecommendationService� + Recommend5.google.cloud.discoveryengine.v1beta.RecommendRequest6.google.cloud.discoveryengine.v1beta.RecommendResponse"�����"W/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend:*Zj"e/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend:*R�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +\'com.google.cloud.discoveryengine.v1betaBRecommendationServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php new file mode 100644 index 0000000000000000000000000000000000000000..8d02f391ef0e71ecb6889af8f961fd3f0e552a2a GIT binary patch literal 1515 zcmb7E!EVz)5G5%@uoXf?LX?WbLJLhLuv@sf6cjgU$blv_RV9$6YO~%XTe)7#yRK9! ze*jlLfg_*7A8_Nq0re}G_1Z~ET2yk$dUoc`%-fmw>P<9?&=PL3ki|qXANNnN8ZjKj zLJ2AY+)oAr7Go-oA|9~V!no1FJDok;Y_#_tL8uf-Oqqj+LJR|D(?BG??Q==RF^f-F zIOHL-kJtN55nIv`J0eyFj!;OBn2ZQzxYc#v!M#ru@md*76W>wr#3S#1>? zOzpcI3E*K97nOB2H9(8k4i$?-5_kinternalAddGeneratedFile( + ' +� +8google/cloud/discoveryengine/v1beta/schema_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/discoveryengine/v1beta/schema.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"O +GetSchemaRequest; +name ( B-�A�A\' +%discoveryengine.googleapis.com/Schema"} +ListSchemasRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStore + page_size ( + +page_token ( "l +ListSchemasResponse< +schemas ( 2+.google.cloud.discoveryengine.v1beta.Schema +next_page_token ( "� +CreateSchemaRequest@ +parent ( B0�A�A* +(discoveryengine.googleapis.com/DataStore@ +schema ( 2+.google.cloud.discoveryengine.v1beta.SchemaB�A + schema_id ( B�A"n +UpdateSchemaRequest@ +schema ( 2+.google.cloud.discoveryengine.v1beta.SchemaB�A + allow_missing ("R +DeleteSchemaRequest; +name ( B-�A�A\' +%discoveryengine.googleapis.com/Schema"x +CreateSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp"x +UpdateSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp"x +DeleteSchemaMetadata/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp2� + SchemaService� + GetSchema5.google.cloud.discoveryengine.v1beta.GetSchemaRequest+.google.cloud.discoveryengine.v1beta.Schema"�����EoP5sqZbkw%H_(00No*)G>fHcpVxjkYMZ$|k##C3}U~k|WtElB!@S>Pcop zkzA5;q6R6@qCoHMsn-_06zHj!#TLEvwtFei-isc3>b18$b>2Kul4U2gg!RSt&0f3BJjHOju4yq(Rg_{?sZ{rr zQn9@E9*X)-&ofv~={QcuV(W(G^jhmJ(>I($=JlD~F>SVfc(2Ir@sxmUn__W=w`_kE>KxOD*wuRy^c zx7V~xL-7MWz+cx*Uo&kpFm=oP2_Ex-($+1XA;R&!?VfD}reiByplTaz?Uo`i`QGcU zgKl}CL1q1)`m9<-;S`KHnl{H~wE_ckx z2TI`e*r;|z@mSFF?E7Rl2Y5aBt8s$+@~+v)+qT2K;MjgHH$2l2;!T1ZmdWg3GMP=2 zS*-#)&<{<=n@qIE!dyDFk#9?m#)i}FI`-*Jcq>@ZF?!vJoH59YI>yj=gBK~8?mjfb z)XBG6gG|}Pa$6h3mPh&~{PPxkIBlIt*My`>6{?O^s46Nnb18(^T@y>0hhJ1_=G~DG zZ60H-83sAraCu~d7e+Gt^zHByX?_zoAj4p|LW%5YBwAriLYb?f46zCpnE<>O!HRk$=#!gSn=s+s1($CzRV?=NmWS#{a=6kcf015@?gxmuI-FRD-nH)jLcRi%Yne&OT6u z{tMljwYf`s+S<`>upSH z!k3p3Iw^f0(qxaNH<{(j7b#$cDfICa-6jwUTILSGNJ*_kW!mfq%optO>6yY=NKo}= zelY{7VM_iGQX=#(y)3h*3v`) zYpB;pf|MmegfA_^Ok{IPD8rhkE9($@ zC{)Pn^>j5)JrYVum*E0l5`kwL*mP>Rf|MK@hZN&_tZlx;m02G&#Vf)WBp6)XGM+g1vsZ zTG93^_1)4&d9z$9E}oIjL9$q`=L_5TUrb8EY<_>Qx){&=F$PN~(Zo}j?K&++=bg_! zn!?j3psG6vxq2UF`EO|%7I&(}(wL!3uu$LM+A7uQ5Y@`|(BqE*9yP-Z-$p`-q=0O8 zY{z4o-oh8GuY34r3_CIIsHB8ldAP&ow{{df#-5wlOVX_#(r6P_PV|R#4X$tpj06OG zfEU_B;67hN>pn+B2YGN}d2ou0|B#IPL^wo)UT&Q8`1g{E#1-oOjoU~H=cd~aK#)#fRa z;Q6Kpc-u95{F2o~$IZL&6jIhXkF`wRo@qVLl+V%XC0MXAJG5gBI(`V7IXs5QHPM-G z!`Uzuv4iIIe1958g(bu0?MnkFqf3 zPS+Mhuj|au;*b!rI+A>QFc-E6qS=_NcML;CxT0&Kw3k-keANC>hJ{S>Qvlj3HZ4SX zPbd8JjFg9D)cZ_y#;El{2&^Sh=R7%P3g@Hu51lddU%dHGNUJ`q@UF;a!~jt?QQyfM zm&w@sjoGW#20HR#!ZPU!EVUiWa$aaXm*z((GBh8cqCJ6xvo zk`q&zFXC`EN87`xD>7W&-umN(mba7ktOpJ-kA~C2>Mn--F1OnBjDBF z$6)!S57PUvTHoK<$=9B0^+)C1-BMAjmGbptEz&!1IbVEIs@3zga(-KTykA0z@>Zo< zqn_yoyjMY)0aU5a9 zsg#|F2PnLm497cWA84TeK{FE|jh@Vl<12W`je7Jd_l#!Z|YoyNBXNklJ;!J}{;`$c#uu=O->71eJ}p(Y%9YX|;@7rl_O5R5 z*}GbdX744M<*Q=${#CTA5sv7GGkUSFfkS#e^#4!%eF2xt5ne7g2AIo@CJ{HK1AxdK5*E82F?KrkW3=&I?sj)1 zS9e=*bz7&oy3cOgXm=mL3th&HuaUDYDB%Y%@Fz}tVc;2zyBzle`J~gk)u%8g*W+y4!R(q|x*t6uE7s*p*n4cYq!S*jd~i z#;?c9a^89vWX0R^{i0Tnu+cY)?224pho4sA-n(?Tenp{7sS9&L7pBt1`dUWq#z8a5 zQm+)U{^>McQJt9I4DnHhkP5>FZTeXfv+o~Ie&>0nltJU4d8ibs(k}x@#X5WxlX}T0 zZB*=;zqd5~16Y!Jju}aP>I8mW8-Fwl6q46x@I&>^x~V)XHyD{&)JXpVDv~US`m{bP z&2Q!A=cUdRf$kv)!&&u%gm~PMLi8zJJ*c}iY59o6K zEnIdGC0(w;ipzNt^it8I4yP|jR9}$fOEA|DLL3bBiu}6;6`y+P5a$%DgE52YxINYV zS{X_@+=O!MMkK6PWw_>43>|@x@D@}VaTD)I-FZ=xG^ZkYDshtKOQ?z0ASCkAfymxP z$#i!rCY%KsRfP>4huyiuR>Kw;W!}Q3VleC%ftzN zc(@k~Xfjgr)-jqi38bVe`g^dL5Zn(EeAmUPP;RAh2ymib&?f6TR3y?U_GMV0iI1>e zPP__pwBKihOYZXSg&#{Ly8`o$I&JL2(nRl|c)Mu2Hp@KU^BGwV?o$6aZ%g8d!aQ8cz2yM57 zSI}2r)}z@Z(sng*grifw1Zl(_RZTIHwA~qTEL)j4&_6pRT)4;|b zC0IN)BNjo+OSpSMe*m*$#mYwW&HuJ;K==COE2PFUK0eGuWjAv=gyZF3rf$RoKFX>h zuXILJvqDq$B^<%oxN`hr8M3QTadMW%FD0mqCld0@fhM}{#Or}AgE7XTJ91?7;{B+I ztSRH7oTA-Sqv&g}$SHS2N18A>_sg;XGHa)Sb`37#xE`A~e#Wp05$YCPRzk+fF~A3z zIr$qZo2z1He6)7x_AH`Sj0S8mnK*7@;1uk5N1-@N(WH}Ad855j&3 zR$&7Lh`J1QVEYWRK7t`7jCjO{?YP@T6nf+F@HgtaEzYaYRRZTIL+?i!JpddP-7 zLV7+bc|M6dr4EifGC=eU1w9;~(%^0zF}D;)h_=uG1+2xt2G~QEJP3fmJwZ|EdI&c5 zD<5&&j>}x9Au*k*z;tStF`b8ZE8K1a0MB=$2tMG5bpd^-kiioG`7eyyKK5Y5T*m)y z;;4lK%&_a@&-iV(VAu5{#6c!)yK&$#Oadqznt_Lkx1holwl_n<+1Y|gjQfHxPL{J9 zFhm2_cWNl|C=MB+``pyFdx)hpi9DHzB|B#&gZ(rSlA|=v-!LZ zkQQR*tIblCvwIQ}%Bm#j;$HSZWKWl105hL~3dAtUwRSKb)e=nAd0 z+FC5y;KqnSUn}A{TU4iAZ@s6zWKh$p5SF=Zc`~`$@!c$r!}6uQGzTSrn5Pm+^Q4Rl z&kS(=5ycFp0ysdQ#wcRuhhQOeDJNywfJX6Z<<6hw+&|@YP#kAd1;;EtG zrHRn5%23QjkdG-|&I?LpTw(>WX!#0X$?q5<(gkp(#f{`Y-@5n5i(oO0Q8xhd=Nx$X zGV!LJiJQw#`pPSF@>=-C_~Q4!zRo=}3iYJ_JyGf2;!W=p&T3Rz=hE@itLERL=gGYC zjdR&7WkZYXQz0LFB-O`m;V>g8Z{i|@qHxT0g!xqtERLt&+{{GaxLZQutBE(4vL)(# zh1dDQ4~nR#hS|t?r>R8g%N{>6A7q5eNRKu%zs-Y1)f-Z|MHxvMcS}flEg@y3idbp2 zFZ`5~GWyOaY-haERCZM1vyJuR$AzPeU>W&Ip)bmxCyixx0h**E3b{s+soTFKE^Kdr59%=&7Gy&d{4>k@iW`6dUPHC}j=M9pe>mFuZ6 zbRCkD;l6SFv2sg_Gq2-4GSQ-V9C}tByF}RDm{@t5d!@E}SZzM6A3Uz_HFo#vKju~& za%Q%wVrI5#$;@1rbGW5u=8MG2(WCWnwpMlyAFjo~{&(&z1!vn5&$h<^ZCe?(7vvoO a&RRNUysc)|kr8+5cq=W{7google.cloud.discoveryengine.v1beta.BigQuerySource + */ +class BigQuerySource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_id = ''; + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + */ + protected $gcs_staging_dir = ''; + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1beta.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. + * + * Generated from protobuf field string data_schema = 6; + */ + protected $data_schema = ''; + protected $partition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $partition_date + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * @type string $project_id + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * @type string $dataset_id + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * @type string $table_id + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * @type string $data_schema + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1beta.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * + * Generated from protobuf field .google.type.Date partition_date = 5; + * @return \Google\Type\Date|null + */ + public function getPartitionDate() + { + return $this->readOneof(5); + } + + public function hasPartitionDate() + { + return $this->hasOneof(5); + } + + /** + * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * + * Generated from protobuf field .google.type.Date partition_date = 5; + * @param \Google\Type\Date $var + * @return $this + */ + public function setPartitionDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID (can be project # or ID) that the BigQuery source is in with + * a length limit of 128 characters. If not specified, inherits the project + * ID from the parent request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Required. The BigQuery data set to copy the data from with a length limit + * of 1,024 characters. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The BigQuery table to copy the data from with a length limit of + * 1,024 characters. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * BigQuery export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1beta.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. + * + * Generated from protobuf field string data_schema = 6; + * @return string + */ + public function getDataSchema() + { + return $this->data_schema; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for user event imports: + * * `user_event` (default): One + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. + * Supported values for document imports: + * * `document` (default): One + * [Document][google.cloud.discoveryengine.v1beta.Document] format per + * row. Each document must have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of + * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] + * or + * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. + * + * Generated from protobuf field string data_schema = 6; + * @param string $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkString($var, True); + $this->data_schema = $var; + + return $this; + } + + /** + * @return string + */ + public function getPartition() + { + return $this->whichOneof("partition"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php new file mode 100644 index 000000000000..9d2ffc416c07 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php @@ -0,0 +1,217 @@ +google.cloud.discoveryengine.v1beta.CollectUserEventRequest + */ +class CollectUserEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = ''; + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for third-party + * requests. + * + * Generated from protobuf field optional string uri = 3; + */ + protected $uri = null; + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + */ + protected $ets = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type string $user_event + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * @type string $uri + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for third-party + * requests. + * @type int|string $ets + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEventService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserEvent() + { + return $this->user_event; + } + + /** + * Required. URL encoded UserEvent proto with a length limit of 2,000,000 + * characters. + * + * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkString($var, True); + $this->user_event = $var; + + return $this; + } + + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for third-party + * requests. + * + * Generated from protobuf field optional string uri = 3; + * @return string + */ + public function getUri() + { + return isset($this->uri) ? $this->uri : ''; + } + + public function hasUri() + { + return isset($this->uri); + } + + public function clearUri() + { + unset($this->uri); + } + + /** + * The URL including cgi-parameters but excluding the hash fragment with a + * length limit of 5,000 characters. This is often more useful than the + * referer URL, because many browsers only send the domain for third-party + * requests. + * + * Generated from protobuf field optional string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + * @return int|string + */ + public function getEts() + { + return isset($this->ets) ? $this->ets : 0; + } + + public function hasEts() + { + return isset($this->ets); + } + + public function clearEts() + { + unset($this->ets); + } + + /** + * The event timestamp in milliseconds. This prevents browser caching of + * otherwise identical get requests. The name is abbreviated to reduce the + * payload bytes. + * + * Generated from protobuf field optional int64 ets = 4; + * @param int|string $var + * @return $this + */ + public function setEts($var) + { + GPBUtil::checkInt64($var); + $this->ets = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php new file mode 100644 index 000000000000..f665058fde9f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php @@ -0,0 +1,321 @@ +google.cloud.discoveryengine.v1beta.CompleteQueryRequest + */ +class CompleteQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $data_store = ''; + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * * `document-completable` - Using suggestions taken directly from + * user-imported document fields marked as completable. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][] dataStores. + * + * Generated from protobuf field string query_model = 3; + */ + protected $query_model = ''; + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + */ + protected $user_pseudo_id = ''; + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + */ + protected $include_tail_suggestions = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_store + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * @type string $query + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * @type string $query_model + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * * `document-completable` - Using suggestions taken directly from + * user-imported document fields marked as completable. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][] dataStores. + * @type string $user_pseudo_id + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type bool $include_tail_suggestions + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDataStore() + { + return $this->data_store; + } + + /** + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataStore($var) + { + GPBUtil::checkString($var, True); + $this->data_store = $var; + + return $this; + } + + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * * `document-completable` - Using suggestions taken directly from + * user-imported document fields marked as completable. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][] dataStores. + * + * Generated from protobuf field string query_model = 3; + * @return string + */ + public function getQueryModel() + { + return $this->query_model; + } + + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * * `document-completable` - Using suggestions taken directly from + * user-imported document fields marked as completable. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * [IndustryVertical.SITE_SEARCH][] dataStores. + * + * Generated from protobuf field string query_model = 3; + * @param string $var + * @return $this + */ + public function setQueryModel($var) + { + GPBUtil::checkString($var, True); + $this->query_model = $var; + + return $this; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 4; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + * @return bool + */ + public function getIncludeTailSuggestions() + { + return $this->include_tail_suggestions; + } + + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + * @param bool $var + * @return $this + */ + public function setIncludeTailSuggestions($var) + { + GPBUtil::checkBool($var); + $this->include_tail_suggestions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php new file mode 100644 index 000000000000..9b4cf95ca911 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1beta.CompleteQueryResponse + */ +class CompleteQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + */ + private $query_suggestions; + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + */ + protected $tail_match_triggered = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $query_suggestions + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * @type bool $tail_match_triggered + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuerySuggestions() + { + return $this->query_suggestions; + } + + /** + * Results of the matched query suggestions. The result list is ordered and + * the first result is a top suggestion. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuerySuggestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion::class); + $this->query_suggestions = $arr; + + return $this; + } + + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + * @return bool + */ + public function getTailMatchTriggered() + { + return $this->tail_match_triggered; + } + + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + * @param bool $var + * @return $this + */ + public function setTailMatchTriggered($var) + { + GPBUtil::checkBool($var); + $this->tail_match_triggered = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php new file mode 100644 index 000000000000..351eb29bf3ce --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + */ +class QuerySuggestion extends \Google\Protobuf\Internal\Message +{ + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + */ + protected $suggestion = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $suggestion + * The suggestion for the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @return string + */ + public function getSuggestion() + { + return $this->suggestion; + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @param string $var + * @return $this + */ + public function setSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->suggestion = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QuerySuggestion::class, \Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse_QuerySuggestion::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php new file mode 100644 index 000000000000..d09e1ee7acdb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php @@ -0,0 +1,114 @@ +google.cloud.discoveryengine.v1beta.CompletionInfo + */ +class CompletionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. + * + * Generated from protobuf field string selected_suggestion = 1; + */ + protected $selected_suggestion = ''; + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + */ + protected $selected_position = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $selected_suggestion + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. + * @type int $selected_position + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] + * position, starting from 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. + * + * Generated from protobuf field string selected_suggestion = 1; + * @return string + */ + public function getSelectedSuggestion() + { + return $this->selected_suggestion; + } + + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. + * + * Generated from protobuf field string selected_suggestion = 1; + * @param string $var + * @return $this + */ + public function setSelectedSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->selected_suggestion = $var; + + return $this; + } + + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + * @return int + */ + public function getSelectedPosition() + { + return $this->selected_position; + } + + /** + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] + * position, starting from 0. + * + * Generated from protobuf field int32 selected_position = 2; + * @param int $var + * @return $this + */ + public function setSelectedPosition($var) + { + GPBUtil::checkInt32($var); + $this->selected_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php new file mode 100644 index 000000000000..0d8c9518a68e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php @@ -0,0 +1,261 @@ +google.cloud.discoveryengine.v1beta.Conversation + */ +class Conversation extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The state of the Conversation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation.State state = 2; + */ + protected $state = 0; + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + */ + protected $user_pseudo_id = ''; + /** + * Conversation messages. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.ConversationMessage messages = 4; + */ + private $messages; + /** + * Output only. The time the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the conversation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` + * @type int $state + * The state of the Conversation. + * @type string $user_pseudo_id + * A unique identifier for tracking users. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\ConversationMessage>|\Google\Protobuf\Internal\RepeatedField $messages + * Conversation messages. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the conversation started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the conversation finished. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The state of the Conversation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the Conversation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\Conversation\State::class); + $this->state = $var; + + return $this; + } + + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * Conversation messages. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.ConversationMessage messages = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Conversation messages. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.ConversationMessage messages = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\ConversationMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\ConversationMessage::class); + $this->messages = $arr; + + return $this; + } + + /** + * Output only. The time the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time the conversation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time the conversation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the conversation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php new file mode 100644 index 000000000000..5f2557134a94 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php @@ -0,0 +1,64 @@ +google.cloud.discoveryengine.v1beta.Conversation.State + */ +class State +{ + /** + * Unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Conversation is currently open. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Conversation has been completed. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETED => 'COMPLETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\DiscoveryEngine\V1beta\Conversation_State::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php new file mode 100644 index 000000000000..33e3f17aa2ea --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.ConversationContext + */ +class ConversationContext extends \Google\Protobuf\Internal\Message +{ + /** + * The current list of documents the user is seeing. + * It contains the document resource references. + * + * Generated from protobuf field repeated string context_documents = 1; + */ + private $context_documents; + /** + * The current active document the user opened. + * It contains the document resource reference. + * + * Generated from protobuf field string active_document = 2; + */ + protected $active_document = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $context_documents + * The current list of documents the user is seeing. + * It contains the document resource references. + * @type string $active_document + * The current active document the user opened. + * It contains the document resource reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * The current list of documents the user is seeing. + * It contains the document resource references. + * + * Generated from protobuf field repeated string context_documents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContextDocuments() + { + return $this->context_documents; + } + + /** + * The current list of documents the user is seeing. + * It contains the document resource references. + * + * Generated from protobuf field repeated string context_documents = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContextDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->context_documents = $arr; + + return $this; + } + + /** + * The current active document the user opened. + * It contains the document resource reference. + * + * Generated from protobuf field string active_document = 2; + * @return string + */ + public function getActiveDocument() + { + return $this->active_document; + } + + /** + * The current active document the user opened. + * It contains the document resource reference. + * + * Generated from protobuf field string active_document = 2; + * @param string $var + * @return $this + */ + public function setActiveDocument($var) + { + GPBUtil::checkString($var, True); + $this->active_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php new file mode 100644 index 000000000000..7330546abd83 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php @@ -0,0 +1,152 @@ +google.cloud.discoveryengine.v1beta.ConversationMessage + */ +class ConversationMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Message creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + protected $message; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\TextInput $user_input + * User text input. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Reply $reply + * Search reply. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Message creation timestamp. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * User text input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TextInput user_input = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\TextInput|null + */ + public function getUserInput() + { + return $this->readOneof(1); + } + + public function hasUserInput() + { + return $this->hasOneof(1); + } + + /** + * User text input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TextInput user_input = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\TextInput $var + * @return $this + */ + public function setUserInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\TextInput::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Search reply. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Reply reply = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Reply|null + */ + public function getReply() + { + return $this->readOneof(2); + } + + public function hasReply() + { + return $this->hasOneof(2); + } + + /** + * Search reply. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Reply reply = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Reply $var + * @return $this + */ + public function setReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Reply::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Message creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Message creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getMessage() + { + return $this->whichOneof("message"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php new file mode 100644 index 000000000000..e2954a76859c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php @@ -0,0 +1,282 @@ +google.cloud.discoveryengine.v1beta.ConverseConversationRequest + */ +class ConverseConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new + * conversation inside a ConverseConversation session. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Current user input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = null; + /** + * The resource name of the Serving Config to use. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + * If this is not set, the default serving config will be used. + * + * Generated from protobuf field string serving_config = 3 [(.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * The conversation to be used by auto session only. The name field will be + * ignored as we automatically assign new name for the conversation in auto + * session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 5; + */ + protected $conversation = null; + /** + * Whether to turn on safe search. + * + * Generated from protobuf field bool safe_search = 6; + */ + protected $safe_search = false; + + /** + * @param string $name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new + * conversation inside a ConverseConversation session. Please see + * {@see ConversationalSearchServiceClient::conversationName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1beta\TextInput $query Required. Current user input. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\DiscoveryEngine\V1beta\TextInput $query): self + { + return (new self()) + ->setName($name) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new + * conversation inside a ConverseConversation session. + * @type \Google\Cloud\DiscoveryEngine\V1beta\TextInput $query + * Required. Current user input. + * @type string $serving_config + * The resource name of the Serving Config to use. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + * If this is not set, the default serving config will be used. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation + * The conversation to be used by auto session only. The name field will be + * ignored as we automatically assign new name for the conversation in auto + * session. + * @type bool $safe_search + * Whether to turn on safe search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new + * conversation inside a ConverseConversation session. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new + * conversation inside a ConverseConversation session. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Current user input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\TextInput|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Required. Current user input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\TextInput $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\TextInput::class); + $this->query = $var; + + return $this; + } + + /** + * The resource name of the Serving Config to use. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + * If this is not set, the default serving config will be used. + * + * Generated from protobuf field string serving_config = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * The resource name of the Serving Config to use. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + * If this is not set, the default serving config will be used. + * + * Generated from protobuf field string serving_config = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * The conversation to be used by auto session only. The name field will be + * ignored as we automatically assign new name for the conversation in auto + * session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 5; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * The conversation to be used by auto session only. The name field will be + * ignored as we automatically assign new name for the conversation in auto + * session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 5; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * Whether to turn on safe search. + * + * Generated from protobuf field bool safe_search = 6; + * @return bool + */ + public function getSafeSearch() + { + return $this->safe_search; + } + + /** + * Whether to turn on safe search. + * + * Generated from protobuf field bool safe_search = 6; + * @param bool $var + * @return $this + */ + public function setSafeSearch($var) + { + GPBUtil::checkBool($var); + $this->safe_search = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php new file mode 100644 index 000000000000..40c48bdf5fee --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php @@ -0,0 +1,157 @@ +google.cloud.discoveryengine.v1beta.ConverseConversationResponse + */ +class ConverseConversationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Answer to the current query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Reply reply = 1; + */ + protected $reply = null; + /** + * Updated conversation including the answer. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2; + */ + protected $conversation = null; + /** + * Search Results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult search_results = 3; + */ + private $search_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Reply $reply + * Answer to the current query. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation + * Updated conversation including the answer. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $search_results + * Search Results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Answer to the current query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Reply reply = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Reply|null + */ + public function getReply() + { + return $this->reply; + } + + public function hasReply() + { + return isset($this->reply); + } + + public function clearReply() + { + unset($this->reply); + } + + /** + * Answer to the current query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Reply reply = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Reply $var + * @return $this + */ + public function setReply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Reply::class); + $this->reply = $var; + + return $this; + } + + /** + * Updated conversation including the answer. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Updated conversation including the answer. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * Search Results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult search_results = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchResults() + { + return $this->search_results; + } + + /** + * Search Results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult search_results = 3; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult::class); + $this->search_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php new file mode 100644 index 000000000000..0ff041f61bfa --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php @@ -0,0 +1,132 @@ +google.cloud.discoveryengine.v1beta.CreateConversationRequest + */ +class CreateConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversation to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + + /** + * @param string $parent Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * Please see {@see ConversationalSearchServiceClient::dataStoreName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation Required. The conversation to create. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateConversationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation): self + { + return (new self()) + ->setParent($parent) + ->setConversation($conversation); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @type \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation + * Required. The conversation to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The conversation to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The conversation to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Conversation::class); + $this->conversation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php new file mode 100644 index 000000000000..c3ff577a2b3d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php @@ -0,0 +1,243 @@ +google.cloud.discoveryengine.v1beta.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1beta.Document], which will become + * the final component of the + * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same + * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document_id = ''; + + /** + * @param string $parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Please see + * {@see DocumentServiceClient::branchName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $document Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to + * create. + * @param string $documentId Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1beta.Document], which will become + * the final component of the + * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + * + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same + * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateDocumentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Document $document, string $documentId): self + { + return (new self()) + ->setParent($parent) + ->setDocument($document) + ->setDocumentId($documentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document + * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to + * create. + * @type string $document_id + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1beta.Document], which will become + * the final component of the + * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same + * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1beta.Document], which will become + * the final component of the + * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same + * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDocumentId() + { + return $this->document_id; + } + + /** + * Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1beta.Document], which will become + * the final component of the + * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + * If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * This field must be unique among all + * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same + * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. + * Otherwise, an `ALREADY_EXISTS` error is returned. + * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->document_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php new file mode 100644 index 000000000000..5142fd3817cb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + */ +class CreateSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php new file mode 100644 index 000000000000..2433a108c8b0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php @@ -0,0 +1,206 @@ +google.cloud.discoveryengine.v1beta.CreateSchemaRequest + */ +class CreateSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = null; + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema_id = ''; + + /** + * @param string $parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see + * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * create. + * @param string $schemaId Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + * + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateSchemaRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema, string $schemaId): self + { + return (new self()) + ->setParent($parent) + ->setSchema($schema) + ->setSchemaId($schemaId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * create. + * @type string $schema_id + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); + $this->schema = $var; + + return $this; + } + + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSchemaId() + { + return $this->schema_id; + } + + /** + * Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + * final component of the + * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * + * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSchemaId($var) + { + GPBUtil::checkString($var, True); + $this->schema_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php new file mode 100644 index 000000000000..bcb2514c5d68 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php @@ -0,0 +1,158 @@ +google.cloud.discoveryengine.v1beta.CustomAttribute + */ +class CustomAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + */ + private $text; + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + */ + private $numbers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $text + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type array|\Google\Protobuf\Internal\RepeatedField $numbers + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); + parent::__construct($data); + } + + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getText() + { + return $this->text; + } + + /** + * The textual values of this custom attribute. For example, `["yellow", + * "green"]` when the key is "color". + * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + * returned. + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated string text = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setText($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->text = $arr; + + return $this; + } + + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNumbers() + { + return $this->numbers; + } + + /** + * The numerical values of this custom attribute. For example, `[2.3, 15.4]` + * when the key is "lengths_cm". + * Exactly one of + * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + * or + * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field repeated double numbers = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNumbers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->numbers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php new file mode 100644 index 000000000000..be56204541e5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php @@ -0,0 +1,86 @@ +google.cloud.discoveryengine.v1beta.DeleteConversationRequest + */ +class DeleteConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * Please see {@see ConversationalSearchServiceClient::conversationName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteConversationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php new file mode 100644 index 000000000000..fd4914bd7778 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php @@ -0,0 +1,120 @@ +google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete + * does not exist, a `NOT_FOUND` error is returned. Please see + * {@see DocumentServiceClient::documentName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteDocumentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete + * does not exist, a `NOT_FOUND` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php new file mode 100644 index 000000000000..abb7de3169fa --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + */ +class DeleteSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php new file mode 100644 index 000000000000..51e741330edf --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php @@ -0,0 +1,88 @@ +google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + */ +class DeleteSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see + * {@see SchemaServiceClient::schemaName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php new file mode 100644 index 000000000000..1a0c1686f3a8 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php @@ -0,0 +1,393 @@ +google.cloud.discoveryengine.v1beta.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $id = ''; + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + */ + protected $schema_id = ''; + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; + */ + protected $content = null; + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + */ + protected $parent_document_id = ''; + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $derived_struct_data = null; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $struct_data + * The structured JSON data for the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * @type string $json_data + * The JSON string representation of the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * @type string $name + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * @type string $id + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * @type string $schema_id + * The identifier of the schema located in the same data store. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Document\Content $content + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * @type string $parent_document_id + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * @type \Google\Protobuf\Struct $derived_struct_data + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Document::initOnce(); + parent::__construct($data); + } + + /** + * The structured JSON data for the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field .google.protobuf.Struct struct_data = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getStructData() + { + return $this->readOneof(4); + } + + public function hasStructData() + { + return $this->hasOneof(4); + } + + /** + * The structured JSON data for the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field .google.protobuf.Struct struct_data = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setStructData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The JSON string representation of the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field string json_data = 5; + * @return string + */ + public function getJsonData() + { + return $this->readOneof(5); + } + + public function hasJsonData() + { + return $this->hasOneof(5); + } + + /** + * The JSON string representation of the document. It should conform to the + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an + * `INVALID_ARGUMENT` error is thrown. + * + * Generated from protobuf field string json_data = 5; + * @param string $var + * @return $this + */ + public function setJsonData($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The full resource name of the document. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Immutable. The identifier of the document. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + * @return string + */ + public function getSchemaId() + { + return $this->schema_id; + } + + /** + * The identifier of the schema located in the same data store. + * + * Generated from protobuf field string schema_id = 3; + * @param string $var + * @return $this + */ + public function setSchemaId($var) + { + GPBUtil::checkString($var, True); + $this->schema_id = $var; + + return $this; + } + + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Document\Content|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * The unstructured data linked to this document. Content must be set if this + * document is under a + * `CONTENT_REQUIRED` data store. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document\Content $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document\Content::class); + $this->content = $var; + + return $this; + } + + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + * @return string + */ + public function getParentDocumentId() + { + return $this->parent_document_id; + } + + /** + * The identifier of the parent document. Currently supports at most two level + * document hierarchy. + * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * standard with a length limit of 63 characters. + * + * Generated from protobuf field string parent_document_id = 7; + * @param string $var + * @return $this + */ + public function setParentDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->parent_document_id = $var; + + return $this; + } + + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Struct|null + */ + public function getDerivedStructData() + { + return $this->derived_struct_data; + } + + public function hasDerivedStructData() + { + return isset($this->derived_struct_data); + } + + public function clearDerivedStructData() + { + unset($this->derived_struct_data); + } + + /** + * Output only. This field is OUTPUT_ONLY. + * It contains derived data that are not in the original input document. + * + * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDerivedStructData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->derived_struct_data = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php new file mode 100644 index 000000000000..11d04d2efbfb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php @@ -0,0 +1,193 @@ +google.cloud.discoveryengine.v1beta.Document.Content + */ +class Content extends \Google\Protobuf\Internal\Message +{ + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF, only native PDFs are supported for now) + * * `text/html` (HTML) + * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + * * `text/plain` (TXT) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + */ + protected $mime_type = ''; + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $raw_bytes + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * @type string $uri + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * @type string $mime_type + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF, only native PDFs are supported for now) + * * `text/html` (HTML) + * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + * * `text/plain` (TXT) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Document::initOnce(); + parent::__construct($data); + } + + /** + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field bytes raw_bytes = 2; + * @return string + */ + public function getRawBytes() + { + return $this->readOneof(2); + } + + public function hasRawBytes() + { + return $this->hasOneof(2); + } + + /** + * The content represented as a stream of bytes. The maximum length is + * 1,000,000 bytes (1 MB / ~0.95 MiB). + * Note: As with all `bytes` fields, this field is represented as pure + * binary in Protocol Buffers and base64-encoded string in JSON. For + * example, `abc123!?$*&()'-=@~` should be represented as + * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field bytes raw_bytes = 2; + * @param string $var + * @return $this + */ + public function setRawBytes($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * + * Generated from protobuf field string uri = 3; + * @return string + */ + public function getUri() + { + return $this->readOneof(3); + } + + public function hasUri() + { + return $this->hasOneof(3); + } + + /** + * The URI of the content. Only Cloud Storage URIs (e.g. + * `gs://bucket-name/path/to/file`) are supported. The maximum file size + * is 100 MB. + * + * Generated from protobuf field string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF, only native PDFs are supported for now) + * * `text/html` (HTML) + * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + * * `text/plain` (TXT) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The MIME type of the content. Supported types: + * * `application/pdf` (PDF, only native PDFs are supported for now) + * * `text/html` (HTML) + * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + * * `text/plain` (TXT) + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * Generated from protobuf field string mime_type = 1; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Content::class, \Google\Cloud\DiscoveryEngine\V1beta\Document_Content::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php new file mode 100644 index 000000000000..ad0e888e6133 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php @@ -0,0 +1,216 @@ +google.cloud.discoveryengine.v1beta.DocumentInfo + */ +class DocumentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + */ + protected $quantity = null; + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + */ + private $promotion_ids; + protected $document_descriptor; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. + * @type string $name + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * @type int $quantity + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->readOneof(1); + } + + public function hasId() + { + return $this->hasOneof(1); + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->readOneof(2); + } + + public function hasName() + { + return $this->hasOneof(2); + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: + * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + * @return int + */ + public function getQuantity() + { + return isset($this->quantity) ? $this->quantity : 0; + } + + public function hasQuantity() + { + return isset($this->quantity); + } + + public function clearQuantity() + { + unset($this->quantity); + } + + /** + * Quantity of the Document associated with the user event. Defaults to 1. + * For example, this field will be 2 if two quantities of the same Document + * are involved in a `add-to-cart` event. + * Required for events of the following event types: + * * `add-to-cart` + * * `purchase` + * + * Generated from protobuf field optional int32 quantity = 3; + * @param int $var + * @return $this + */ + public function setQuantity($var) + { + GPBUtil::checkInt32($var); + $this->quantity = $var; + + return $this; + } + + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPromotionIds() + { + return $this->promotion_ids; + } + + /** + * The promotion IDs associated with this Document. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPromotionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->promotion_ids = $arr; + + return $this; + } + + /** + * @return string + */ + public function getDocumentDescriptor() + { + return $this->whichOneof("document_descriptor"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php new file mode 100644 index 000000000000..45a1309018d7 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php @@ -0,0 +1,201 @@ +google.cloud.discoveryengine.v1beta.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $input_uris; + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each + * document must + * have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` becomes a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined + * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + */ + protected $data_schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $input_uris + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * @type string $data_schema + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each + * document must + * have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` becomes a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined + * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputUris() + { + return $this->input_uris; + } + + /** + * Required. Cloud Storage URIs to input files. URI can be up to + * 2000 characters long. URIs can match the full object path (for example, + * `gs://bucket/directory/object.json`) or a pattern matching one or more + * files, such as `gs://bucket/directory/*.json`. + * A request can contain at most 100 files (or 100,000 files if `data_schema` + * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + * `content`). + * + * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_uris = $arr; + + return $this; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each + * document must + * have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` becomes a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined + * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + * @return string + */ + public function getDataSchema() + { + return $this->data_schema; + } + + /** + * The schema to use when parsing the data from the source. + * Supported values for document imports: + * * `document` (default): One JSON + * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each + * document must + * have a valid + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + * `input_uris` becomes a document, with the ID set to the first 128 + * bits of SHA256(URI) encoded as a hex string. + * * `custom`: One custom data JSON per row in arbitrary format that conforms + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined + * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. + * Supported values for user even imports: + * * `user_event` (default): One JSON + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. + * + * Generated from protobuf field string data_schema = 2; + * @param string $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkString($var, True); + $this->data_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php new file mode 100644 index 000000000000..94107e25b12d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php @@ -0,0 +1,86 @@ +google.cloud.discoveryengine.v1beta.GetConversationRequest + */ +class GetConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * Please see {@see ConversationalSearchServiceClient::conversationName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\GetConversationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php new file mode 100644 index 000000000000..3a69b7e806d6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php @@ -0,0 +1,120 @@ +google.cloud.discoveryengine.v1beta.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] + * does not exist, a `NOT_FOUND` error is returned. Please see + * {@see DocumentServiceClient::documentName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\GetDocumentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] + * does not exist, a `NOT_FOUND` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1beta.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + * If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] + * does not exist, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php new file mode 100644 index 000000000000..4e19a0e38020 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php @@ -0,0 +1,88 @@ +google.cloud.discoveryengine.v1beta.GetSchemaRequest + */ +class GetSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see + * {@see SchemaServiceClient::schemaName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\GetSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php new file mode 100644 index 000000000000..feabb561b010 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + */ +class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were processed successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php new file mode 100644 index 000000000000..053193a657b1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php @@ -0,0 +1,505 @@ +google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + */ + protected $error_config = null; + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + */ + protected $reconciliation_mode = 0; + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s + * have to be specified using + * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], + * otherwise, documents without IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + */ + protected $auto_generate_ids = false; + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the + * key of the JSON field. For instance, `my_id` for JSON `{"my_id": + * "some_uuid"}`. For + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column are used as the + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON + * field or the BigQuery column must be of string type, and the values must be + * set as valid strings conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. + * Otherwise, documents without valid IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + */ + protected $id_field = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $inline_source + * The Inline source for the input content for documents. + * @type \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $gcs_source + * Cloud Storage location for the input content. + * @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source + * BigQuery input source. + * @type string $parent + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config + * The desired location of errors incurred during the Import. + * @type int $reconciliation_mode + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * @type bool $auto_generate_ids + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s + * have to be specified using + * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], + * otherwise, documents without IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * @type string $id_field + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the + * key of the JSON field. For instance, `my_id` for JSON `{"my_id": + * "some_uuid"}`. For + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column are used as the + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON + * field or the BigQuery column must be of string type, and the values must be + * set as valid strings conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. + * Otherwise, documents without valid IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The Inline source for the input content for documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource|null + */ + public function getInlineSource() + { + return $this->readOneof(2); + } + + public function hasInlineSource() + { + return $this->hasOneof(2); + } + + /** + * The Inline source for the input content for documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $var + * @return $this + */ + public function setInlineSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(3); + } + + public function hasGcsSource() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\GcsSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource|null + */ + public function getBigquerySource() + { + return $this->readOneof(4); + } + + public function hasBigquerySource() + { + return $this->hasOneof(4); + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $var + * @return $this + */ + public function setBigquerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Requires create/update permission. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * The desired location of errors incurred during the Import. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * @return int + */ + public function getReconciliationMode() + { + return $this->reconciliation_mode; + } + + /** + * The mode of reconciliation between existing documents and the documents to + * be imported. Defaults to + * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * @param int $var + * @return $this + */ + public function setReconciliationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\ReconciliationMode::class); + $this->reconciliation_mode = $var; + + return $this; + } + + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s + * have to be specified using + * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], + * otherwise, documents without IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + * @return bool + */ + public function getAutoGenerateIds() + { + return $this->auto_generate_ids; + } + + /** + * Whether to automatically generate IDs for the documents if absent. + * If set to `true`, + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are + * automatically generated based on the hash of the payload, where IDs may not + * be consistent during multiple imports. In which case + * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] + * is highly recommended to avoid duplicate contents. If unset or set to + * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s + * have to be specified using + * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], + * otherwise, documents without IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field bool auto_generate_ids = 8; + * @param bool $var + * @return $this + */ + public function setAutoGenerateIds($var) + { + GPBUtil::checkBool($var); + $this->auto_generate_ids = $var; + + return $this; + } + + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the + * key of the JSON field. For instance, `my_id` for JSON `{"my_id": + * "some_uuid"}`. For + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column are used as the + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON + * field or the BigQuery column must be of string type, and the values must be + * set as valid strings conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. + * Otherwise, documents without valid IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + * @return string + */ + public function getIdField() + { + return $this->id_field; + } + + /** + * The field in the Cloud Storage and BigQuery sources that indicates the + * unique IDs of the documents. + * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the + * key of the JSON field. For instance, `my_id` for JSON `{"my_id": + * "some_uuid"}`. For + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is + * the column name of the BigQuery table where the unique ids are stored. + * The values of the JSON field or the BigQuery column are used as the + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON + * field or the BigQuery column must be of string type, and the values must be + * set as valid strings conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. + * Otherwise, documents without valid IDs fail to be imported. + * Only set this field when using + * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or + * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and + * when + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * or + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * is `custom`. And only set this field when + * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] + * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + * If it is unset, a default value `_id` is used when importing from the + * allowed data sources. + * + * Generated from protobuf field string id_field = 9; + * @param string $var + * @return $this + */ + public function setIdField($var) + { + GPBUtil::checkString($var, True); + $this->id_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php new file mode 100644 index 000000000000..432d9ace56e2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php @@ -0,0 +1,78 @@ +google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * Recommended max of 100 items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * Required. A list of documents to update/create. Each document must have a + * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + * Recommended max of 100 items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->documents = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest_InlineSource::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php new file mode 100644 index 000000000000..116a8bbc91eb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php @@ -0,0 +1,66 @@ +google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode + */ +class ReconciliationMode +{ + /** + * Defaults to `INCREMENTAL`. + * + * Generated from protobuf enum RECONCILIATION_MODE_UNSPECIFIED = 0; + */ + const RECONCILIATION_MODE_UNSPECIFIED = 0; + /** + * Inserts new documents or updates existing documents. + * + * Generated from protobuf enum INCREMENTAL = 1; + */ + const INCREMENTAL = 1; + /** + * Calculates diff and replaces the entire document dataset. Existing + * documents may be deleted if they are not present in the source location. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::RECONCILIATION_MODE_UNSPECIFIED => 'RECONCILIATION_MODE_UNSPECIFIED', + self::INCREMENTAL => 'INCREMENTAL', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReconciliationMode::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest_ReconciliationMode::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php new file mode 100644 index 000000000000..e7b7a892fb75 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php @@ -0,0 +1,114 @@ +google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + */ +class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + */ + private $error_samples; + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + */ + protected $error_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples + * A sample of errors encountered while processing the request. + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config + * Echoes the destination for the complete errors in the request if set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorSamples() + { + return $this->error_samples; + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorSamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->error_samples = $arr; + + return $this; + } + + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * Echoes the destination for the complete errors in the request if set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php new file mode 100644 index 000000000000..139a27318096 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php @@ -0,0 +1,84 @@ +google.cloud.discoveryengine.v1beta.ImportErrorConfig + */ +class ImportErrorConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_prefix + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors are written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors are written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * + * Generated from protobuf field string gcs_prefix = 1; + * @return string + */ + public function getGcsPrefix() + { + return $this->readOneof(1); + } + + public function hasGcsPrefix() + { + return $this->hasOneof(1); + } + + /** + * Cloud Storage prefix for import errors. This must be an empty, + * existing Cloud Storage directory. Import errors are written to + * sharded files in this directory, one per line, as a JSON-encoded + * `google.rpc.Status` message. + * + * Generated from protobuf field string gcs_prefix = 1; + * @param string $var + * @return $this + */ + public function setGcsPrefix($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php new file mode 100644 index 000000000000..e3208f50df10 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + */ +class ImportUserEventsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were processed successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php new file mode 100644 index 000000000000..06c544d24154 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php @@ -0,0 +1,227 @@ +google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + */ +class ImportUserEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + */ + protected $error_config = null; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource $inline_source + * The Inline source for the input content for UserEvents. + * @type \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $gcs_source + * Cloud Storage location for the input content. + * @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source + * BigQuery input source. + * @type string $parent + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The Inline source for the input content for UserEvents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource inline_source = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource|null + */ + public function getInlineSource() + { + return $this->readOneof(2); + } + + public function hasInlineSource() + { + return $this->hasOneof(2); + } + + /** + * The Inline source for the input content for UserEvents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource inline_source = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource $var + * @return $this + */ + public function setInlineSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(3); + } + + public function hasGcsSource() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage location for the input content. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\GcsSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource|null + */ + public function getBigquerySource() + { + return $this->readOneof(4); + } + + public function hasBigquerySource() + { + return $this->hasOneof(4); + } + + /** + * BigQuery input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $var + * @return $this + */ + public function setBigquerySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent DataStore resource name, of the form + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * The desired location of errors incurred during the Import. Cannot be set + * for inline user event imports. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php new file mode 100644 index 000000000000..797d86927c35 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $user_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\UserEvent>|\Google\Protobuf\Internal\RepeatedField $user_events + * Required. A list of user events to import. Recommended max of 10k items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserEvents() + { + return $this->user_events; + } + + /** + * Required. A list of user events to import. Recommended max of 10k items. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\UserEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); + $this->user_events = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest_InlineSource::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php new file mode 100644 index 000000000000..e7fcdc3bd028 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php @@ -0,0 +1,189 @@ +google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + */ +class ImportUserEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + */ + private $error_samples; + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + */ + protected $error_config = null; + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + */ + protected $joined_events_count = 0; + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + */ + protected $unjoined_events_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples + * A sample of errors encountered while processing the request. + * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config + * Echoes the destination for the complete errors if this field was set in + * the request. + * @type int|string $joined_events_count + * Count of user events imported with complete existing Documents. + * @type int|string $unjoined_events_count + * Count of user events imported, but with Document information not found + * in the existing Branch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorSamples() + { + return $this->error_samples; + } + + /** + * A sample of errors encountered while processing the request. + * + * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorSamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->error_samples = $arr; + + return $this; + } + + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null + */ + public function getErrorConfig() + { + return $this->error_config; + } + + public function hasErrorConfig() + { + return isset($this->error_config); + } + + public function clearErrorConfig() + { + unset($this->error_config); + } + + /** + * Echoes the destination for the complete errors if this field was set in + * the request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var + * @return $this + */ + public function setErrorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); + $this->error_config = $var; + + return $this; + } + + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + * @return int|string + */ + public function getJoinedEventsCount() + { + return $this->joined_events_count; + } + + /** + * Count of user events imported with complete existing Documents. + * + * Generated from protobuf field int64 joined_events_count = 3; + * @param int|string $var + * @return $this + */ + public function setJoinedEventsCount($var) + { + GPBUtil::checkInt64($var); + $this->joined_events_count = $var; + + return $this; + } + + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + * @return int|string + */ + public function getUnjoinedEventsCount() + { + return $this->unjoined_events_count; + } + + /** + * Count of user events imported, but with Document information not found + * in the existing Branch. + * + * Generated from protobuf field int64 unjoined_events_count = 4; + * @param int|string $var + * @return $this + */ + public function setUnjoinedEventsCount($var) + { + GPBUtil::checkInt64($var); + $this->unjoined_events_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php new file mode 100644 index 000000000000..0b49a3c8d689 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php @@ -0,0 +1,183 @@ +google.cloud.discoveryengine.v1beta.Interval + */ +class Interval extends \Google\Protobuf\Internal\Message +{ + protected $min; + protected $max; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $minimum + * Inclusive lower bound. + * @type float $exclusive_minimum + * Exclusive lower bound. + * @type float $maximum + * Inclusive upper bound. + * @type float $exclusive_maximum + * Exclusive upper bound. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); + parent::__construct($data); + } + + /** + * Inclusive lower bound. + * + * Generated from protobuf field double minimum = 1; + * @return float + */ + public function getMinimum() + { + return $this->readOneof(1); + } + + public function hasMinimum() + { + return $this->hasOneof(1); + } + + /** + * Inclusive lower bound. + * + * Generated from protobuf field double minimum = 1; + * @param float $var + * @return $this + */ + public function setMinimum($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Exclusive lower bound. + * + * Generated from protobuf field double exclusive_minimum = 2; + * @return float + */ + public function getExclusiveMinimum() + { + return $this->readOneof(2); + } + + public function hasExclusiveMinimum() + { + return $this->hasOneof(2); + } + + /** + * Exclusive lower bound. + * + * Generated from protobuf field double exclusive_minimum = 2; + * @param float $var + * @return $this + */ + public function setExclusiveMinimum($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Inclusive upper bound. + * + * Generated from protobuf field double maximum = 3; + * @return float + */ + public function getMaximum() + { + return $this->readOneof(3); + } + + public function hasMaximum() + { + return $this->hasOneof(3); + } + + /** + * Inclusive upper bound. + * + * Generated from protobuf field double maximum = 3; + * @param float $var + * @return $this + */ + public function setMaximum($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Exclusive upper bound. + * + * Generated from protobuf field double exclusive_maximum = 4; + * @return float + */ + public function getExclusiveMaximum() + { + return $this->readOneof(4); + } + + public function hasExclusiveMaximum() + { + return $this->hasOneof(4); + } + + /** + * Exclusive upper bound. + * + * Generated from protobuf field double exclusive_maximum = 4; + * @param float $var + * @return $this + */ + public function setExclusiveMaximum($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getMin() + { + return $this->whichOneof("min"); + } + + /** + * @return string + */ + public function getMax() + { + return $this->whichOneof("max"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php new file mode 100644 index 000000000000..bbe70a5b6a0a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php @@ -0,0 +1,274 @@ +google.cloud.discoveryengine.v1beta.ListConversationsRequest + */ +class ListConversationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListConversations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `conversation_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * Please see {@see ConversationalSearchServiceClient::dataStoreName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ListConversationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @type int $page_size + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * @type string $page_token + * A page token, received from a previous `ListConversations` call. + * Provide this to retrieve the subsequent page. + * @type string $filter + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * @type string $order_by + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `conversation_name` + * Example: + * "update_time desc" + * "create_time" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListConversations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListConversations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `conversation_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `conversation_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php new file mode 100644 index 000000000000..9fce424c10dc --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php @@ -0,0 +1,101 @@ +google.cloud.discoveryengine.v1beta.ListConversationsResponse + */ +class ListConversationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All the Conversations for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Conversation conversations = 1; + */ + private $conversations; + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Conversation>|\Google\Protobuf\Internal\RepeatedField $conversations + * All the Conversations for a given data store. + * @type string $next_page_token + * Pagination token, if not returned indicates the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * All the Conversations for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Conversation conversations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversations() + { + return $this->conversations; + } + + /** + * All the Conversations for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Conversation conversations = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Conversation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Conversation::class); + $this->conversations = $arr; + + return $this; + } + + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php new file mode 100644 index 000000000000..2257b17f5bff --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php @@ -0,0 +1,231 @@ +google.cloud.discoveryengine.v1beta.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to 100. The maximum allowed value is + * 1000. Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. Please see + * {@see DocumentServiceClient::branchName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ListDocumentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * @type int $page_size + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to 100. The maximum allowed value is + * 1000. Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * @type string $page_token + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default + * branch. + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this + * branch, regardless of whether or not this branch exists, a + * `PERMISSION_DENIED` error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to 100. The maximum allowed value is + * 1000. Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to 100. The maximum allowed value is + * 1000. Values above 1000 will be coerced to 1000. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token + * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], + * received from a previous + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php new file mode 100644 index 000000000000..1d2842848b1d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1beta.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; + */ + private $documents; + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * The [Document][google.cloud.discoveryengine.v1beta.Document]s. + * @type string $next_page_token + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The [Document][google.cloud.discoveryengine.v1beta.Document]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php new file mode 100644 index 000000000000..d1de3973ccbd --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php @@ -0,0 +1,192 @@ +google.cloud.discoveryengine.v1beta.ListSchemasRequest + */ +class ListSchemasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s + * to return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see + * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ListSchemasRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type int $page_size + * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s + * to return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s + * to return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s + * to return. The service may return fewer than this value. + * If unspecified, at most 100 + * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php new file mode 100644 index 000000000000..f99765b34761 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1beta.ListSchemasResponse + */ +class ListSchemasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; + */ + private $schemas; + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas + * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + * @type string $next_page_token + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchemas() + { + return $this->schemas; + } + + /** + * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Schema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); + $this->schemas = $arr; + + return $this; + } + + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php new file mode 100644 index 000000000000..4a42fda0d13f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php @@ -0,0 +1,157 @@ +google.cloud.discoveryengine.v1beta.MediaInfo + */ +class MediaInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + */ + protected $media_progress_duration = null; + /** + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + */ + protected $media_progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $media_progress_duration + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. + * @type float $media_progress_percentage + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMediaProgressDuration() + { + return $this->media_progress_duration; + } + + public function hasMediaProgressDuration() + { + return isset($this->media_progress_duration); + } + + public function clearMediaProgressDuration() + { + unset($this->media_progress_duration); + } + + /** + * The media progress time in seconds, if applicable. + * For example, if the end user has finished 90 seconds of a playback video, + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. + * + * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMediaProgressDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->media_progress_duration = $var; + + return $this; + } + + /** + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + * @return float + */ + public function getMediaProgressPercentage() + { + return isset($this->media_progress_percentage) ? $this->media_progress_percentage : 0.0; + } + + public function hasMediaProgressPercentage() + { + return isset($this->media_progress_percentage); + } + + public function clearMediaProgressPercentage() + { + unset($this->media_progress_percentage); + } + + /** + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] + * relative to the media total length. + * This value must be between `[0, 1.0]` inclusive. + * If this is not a playback or the progress cannot be computed (e.g. ongoing + * livestream), this field should be unset. + * + * Generated from protobuf field optional float media_progress_percentage = 2; + * @param float $var + * @return $this + */ + public function setMediaProgressPercentage($var) + { + GPBUtil::checkFloat($var); + $this->media_progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php new file mode 100644 index 000000000000..8d5046740830 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php @@ -0,0 +1,253 @@ +google.cloud.discoveryengine.v1beta.PageInfo + */ +class PageInfo extends \Google\Protobuf\Internal\Message +{ + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageview_id` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + */ + protected $pageview_id = ''; + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_category = 2; + */ + protected $page_category = ''; + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + */ + protected $uri = ''; + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + */ + protected $referrer_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pageview_id + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageview_id` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * @type string $page_category + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type string $uri + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * @type string $referrer_uri + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageview_id` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + * @return string + */ + public function getPageviewId() + { + return $this->pageview_id; + } + + /** + * A unique ID of a web page view. + * This should be kept the same for all user events triggered from the same + * pageview. For example, an item detail page view could trigger multiple + * events as the user is browsing the page. The `pageview_id` property should + * be kept the same for all these events so that they can be grouped together + * properly. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. + * + * Generated from protobuf field string pageview_id = 1; + * @param string $var + * @return $this + */ + public function setPageviewId($var) + { + GPBUtil::checkString($var, True); + $this->pageview_id = $var; + + return $this; + } + + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_category = 2; + * @return string + */ + public function getPageCategory() + { + return $this->page_category; + } + + /** + * The most specific category associated with a category page. + * To represent full path of category, use '>' sign to separate different + * hierarchies. If '>' is part of the category name, please replace it with + * other character(s). + * Category pages include special pages such as sales or promotions. For + * instance, a special sale page may have the category hierarchy: + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. + * Required for `view-category-page` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_category = 2; + * @param string $var + * @return $this + */ + public function setPageCategory($var) + { + GPBUtil::checkString($var, True); + $this->page_category = $var; + + return $this; + } + + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Complete URL (window.location.href) of the user's current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. Maximum length 5,000 + * characters. + * + * Generated from protobuf field string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + * @return string + */ + public function getReferrerUri() + { + return $this->referrer_uri; + } + + /** + * The referrer URL of the current page. + * When using the client side event reporting with JavaScript pixel and Google + * Tag Manager, this value is filled in automatically. However, some browser + * privacy restrictions may cause this field to be empty. + * + * Generated from protobuf field string referrer_uri = 4; + * @param string $var + * @return $this + */ + public function setReferrerUri($var) + { + GPBUtil::checkString($var, True); + $this->referrer_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php new file mode 100644 index 000000000000..4e6f18a8604f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php @@ -0,0 +1,213 @@ +google.cloud.discoveryengine.v1beta.PanelInfo + */ +class PanelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $panel_id = ''; + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] + * must also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + */ + protected $panel_position = null; + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + */ + protected $total_panels = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $panel_id + * Required. The panel ID. + * @type string $display_name + * The display name of the panel. + * @type int $panel_position + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] + * must also be set. + * @type int $total_panels + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] + * is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPanelId() + { + return $this->panel_id; + } + + /** + * Required. The panel ID. + * + * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPanelId($var) + { + GPBUtil::checkString($var, True); + $this->panel_id = $var; + + return $this; + } + + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the panel. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] + * must also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + * @return int + */ + public function getPanelPosition() + { + return isset($this->panel_position) ? $this->panel_position : 0; + } + + public function hasPanelPosition() + { + return isset($this->panel_position); + } + + public function clearPanelPosition() + { + unset($this->panel_position); + } + + /** + * The ordered position of the panel, if shown to the user with other panels. + * If set, then + * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] + * must also be set. + * + * Generated from protobuf field optional int32 panel_position = 4; + * @param int $var + * @return $this + */ + public function setPanelPosition($var) + { + GPBUtil::checkInt32($var); + $this->panel_position = $var; + + return $this; + } + + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + * @return int + */ + public function getTotalPanels() + { + return isset($this->total_panels) ? $this->total_panels : 0; + } + + public function hasTotalPanels() + { + return isset($this->total_panels); + } + + public function clearTotalPanels() + { + unset($this->total_panels); + } + + /** + * The total number of panels, including this one, shown to the user. + * Must be set if + * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] + * is set. + * + * Generated from protobuf field optional int32 total_panels = 5; + * @param int $var + * @return $this + */ + public function setTotalPanels($var) + { + GPBUtil::checkInt32($var); + $this->total_panels = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php new file mode 100644 index 000000000000..3207bdbf6122 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php @@ -0,0 +1,194 @@ +google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + */ +class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * @type int|string $success_count + * Count of entries that were deleted successfully. + * @type int|string $failure_count + * Count of entries that encountered errors while processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of entries that were deleted successfully. + * + * Generated from protobuf field int64 success_count = 3; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of entries that encountered errors while processing. + * + * Generated from protobuf field int64 failure_count = 4; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php new file mode 100644 index 000000000000..99adaad192e5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + */ +class PurgeDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @type string $filter + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * @type bool $force + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php new file mode 100644 index 000000000000..fd207e22e4f6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php @@ -0,0 +1,112 @@ +google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + */ +class PurgeDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + */ + protected $purge_count = 0; + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + */ + private $purge_sample; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $purge_count + * The total count of documents purged as a result of the operation. + * @type array|\Google\Protobuf\Internal\RepeatedField $purge_sample + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); + parent::__construct($data); + } + + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + * @return int|string + */ + public function getPurgeCount() + { + return $this->purge_count; + } + + /** + * The total count of documents purged as a result of the operation. + * + * Generated from protobuf field int64 purge_count = 1; + * @param int|string $var + * @return $this + */ + public function setPurgeCount($var) + { + GPBUtil::checkInt64($var); + $this->purge_count = $var; + + return $this; + } + + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPurgeSample() + { + return $this->purge_sample; + } + + /** + * A sample of document names that will be deleted. Only populated if `force` + * is set to false. A max of 100 names will be returned and the names are + * chosen at random. + * + * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPurgeSample($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->purge_sample = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php new file mode 100644 index 000000000000..e433ed62c9ae --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php @@ -0,0 +1,565 @@ +google.cloud.discoveryengine.v1beta.RecommendRequest + */ +class RecommendRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of the format: + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * Before you can request recommendations from your model, you must create at + * least one serving config for it. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = null; + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1beta.Document]s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + */ + protected $validate_only = false; + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * + * Generated from protobuf field map params = 6; + */ + private $params; + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + */ + private $user_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serving_config + * Required. Full resource name of the format: + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * Before you can request recommendations from your model, you must create at + * least one serving config for it. + * @type \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $user_event + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * unset. + * @type int $page_size + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * @type string $filter + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1beta.Document]s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + * @type bool $validate_only + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * @type array|\Google\Protobuf\Internal\MapField $params + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of the format: + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * Before you can request recommendations from your model, you must create at + * least one serving config for it. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * Required. Full resource name of the format: + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * Before you can request recommendations from your model, you must create at + * least one serving config for it. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\UserEvent|null + */ + public function getUserEvent() + { + return $this->user_event; + } + + public function hasUserEvent() + { + return isset($this->user_event); + } + + public function clearUserEvent() + { + unset($this->user_event); + } + + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); + $this->user_event = $var; + + return $this; + } + + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1beta.Document]s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1beta.Document]s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * + * Generated from protobuf field map params = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * + * Generated from protobuf field map params = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->params = $arr; + + return $this; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php new file mode 100644 index 000000000000..8e44adf0d4f0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php @@ -0,0 +1,197 @@ +google.cloud.discoveryengine.v1beta.RecommendResponse + */ +class RecommendResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; + */ + private $results; + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this recommendation, which enables accurate attribution of + * recommendation model performance. + * + * Generated from protobuf field string attribution_token = 2; + */ + protected $attribution_token = ''; + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + */ + private $missing_ids; + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $results + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * @type string $attribution_token + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this recommendation, which enables accurate attribution of + * recommendation model performance. + * @type array|\Google\Protobuf\Internal\RepeatedField $missing_ids + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * @type bool $validate_only + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] + * was set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult::class); + $this->results = $arr; + + return $this; + } + + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this recommendation, which enables accurate attribution of + * recommendation model performance. + * + * Generated from protobuf field string attribution_token = 2; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this recommendation, which enables accurate attribution of + * recommendation model performance. + * + * Generated from protobuf field string attribution_token = 2; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMissingIds() + { + return $this->missing_ids; + } + + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMissingIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->missing_ids = $arr; + + return $this; + } + + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php new file mode 100644 index 000000000000..4e854a029d52 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php @@ -0,0 +1,169 @@ +google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + */ +class RecommendationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + */ + protected $document = null; + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Resource ID of the recommended Document. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->metadata = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RecommendationResult::class, \Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse_RecommendationResult::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php new file mode 100644 index 000000000000..cae9ad172286 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php @@ -0,0 +1,101 @@ +google.cloud.discoveryengine.v1beta.Reply + */ +class Reply extends \Google\Protobuf\Internal\Message +{ + /** + * Text reply. + * + * Generated from protobuf field string reply = 1; + */ + protected $reply = ''; + /** + * References in the reply. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2; + */ + private $references; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reply + * Text reply. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference>|\Google\Protobuf\Internal\RepeatedField $references + * References in the reply. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Text reply. + * + * Generated from protobuf field string reply = 1; + * @return string + */ + public function getReply() + { + return $this->reply; + } + + /** + * Text reply. + * + * Generated from protobuf field string reply = 1; + * @param string $var + * @return $this + */ + public function setReply($var) + { + GPBUtil::checkString($var, True); + $this->reply = $var; + + return $this; + } + + /** + * References in the reply. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferences() + { + return $this->references; + } + + /** + * References in the reply. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference::class); + $this->references = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php new file mode 100644 index 000000000000..bdadbc337035 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php @@ -0,0 +1,172 @@ +google.cloud.discoveryengine.v1beta.Reply.Reference + */ +class Reference extends \Google\Protobuf\Internal\Message +{ + /** + * URI link reference. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Anchor text. + * + * Generated from protobuf field string anchor_text = 2; + */ + protected $anchor_text = ''; + /** + * Anchor text start index. + * + * Generated from protobuf field int32 start = 3; + */ + protected $start = 0; + /** + * Anchor text end index. + * + * Generated from protobuf field int32 end = 4; + */ + protected $end = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI link reference. + * @type string $anchor_text + * Anchor text. + * @type int $start + * Anchor text start index. + * @type int $end + * Anchor text end index. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * URI link reference. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI link reference. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Anchor text. + * + * Generated from protobuf field string anchor_text = 2; + * @return string + */ + public function getAnchorText() + { + return $this->anchor_text; + } + + /** + * Anchor text. + * + * Generated from protobuf field string anchor_text = 2; + * @param string $var + * @return $this + */ + public function setAnchorText($var) + { + GPBUtil::checkString($var, True); + $this->anchor_text = $var; + + return $this; + } + + /** + * Anchor text start index. + * + * Generated from protobuf field int32 start = 3; + * @return int + */ + public function getStart() + { + return $this->start; + } + + /** + * Anchor text start index. + * + * Generated from protobuf field int32 start = 3; + * @param int $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkInt32($var); + $this->start = $var; + + return $this; + } + + /** + * Anchor text end index. + * + * Generated from protobuf field int32 end = 4; + * @return int + */ + public function getEnd() + { + return $this->end; + } + + /** + * Anchor text end index. + * + * Generated from protobuf field int32 end = 4; + * @param int $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkInt32($var); + $this->end = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reference::class, \Google\Cloud\DiscoveryEngine\V1beta\Reply_Reference::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php new file mode 100644 index 000000000000..707f22be7389 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php @@ -0,0 +1,154 @@ +google.cloud.discoveryengine.v1beta.Schema + */ +class Schema extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $struct_schema + * The structured representation of the schema. + * @type string $json_schema + * The JSON representation of the schema. + * @type string $name + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Schema::initOnce(); + parent::__construct($data); + } + + /** + * The structured representation of the schema. + * + * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getStructSchema() + { + return $this->readOneof(2); + } + + public function hasStructSchema() + { + return $this->hasOneof(2); + } + + /** + * The structured representation of the schema. + * + * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setStructSchema($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The JSON representation of the schema. + * + * Generated from protobuf field string json_schema = 3; + * @return string + */ + public function getJsonSchema() + { + return $this->readOneof(3); + } + + public function hasJsonSchema() + { + return $this->hasOneof(3); + } + + /** + * The JSON representation of the schema. + * + * Generated from protobuf field string json_schema = 3; + * @param string $var + * @return $this + */ + public function setJsonSchema($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * This field must be a UTF-8 encoded string with a length limit of 1024 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php new file mode 100644 index 000000000000..0c701aeeff2a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php @@ -0,0 +1,245 @@ +google.cloud.discoveryengine.v1beta.SearchInfo + */ +class SearchInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] + * or + * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string search_query = 1; + */ + protected $search_query = ''; + /** + * The order in which products are returned, if applicable. + * See + * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] + * for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string order_by = 2; + */ + protected $order_by = ''; + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] + * for definition. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $search_query + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] + * or + * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type string $order_by + * The order in which products are returned, if applicable. + * See + * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] + * for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type int $offset + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] + * for definition. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] + * or + * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string search_query = 1; + * @return string + */ + public function getSearchQuery() + { + return $this->search_query; + } + + /** + * The user's search query. + * See + * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] + * for definition. + * The value must be a UTF-8 encoded string with a length limit of 5,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * At least one of + * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] + * or + * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] + * is required for `search` events. Other event types should not set this + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string search_query = 1; + * @param string $var + * @return $this + */ + public function setSearchQuery($var) + { + GPBUtil::checkString($var, True); + $this->search_query = $var; + + return $this; + } + + /** + * The order in which products are returned, if applicable. + * See + * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] + * for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string order_by = 2; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order in which products are returned, if applicable. + * See + * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] + * for definition and syntax. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string order_by = 2; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] + * for definition. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + * @return int + */ + public function getOffset() + { + return isset($this->offset) ? $this->offset : 0; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * An integer that specifies the current offset for pagination (the 0-indexed + * starting location, amongst the products deemed by the API as relevant). + * See + * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] + * for definition. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * This can only be set for `search` events. Other event types should not set + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field optional int32 offset = 3; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php new file mode 100644 index 000000000000..2ba13d5cf0eb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php @@ -0,0 +1,1005 @@ +google.cloud.discoveryengine.v1beta.SearchRequest + */ +class SearchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + */ + protected $branch = ''; + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + */ + protected $query = ''; + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + protected $image_query = null; + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 are coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API + * as relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * is unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + */ + protected $offset = 0; + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string filter = 7; + */ + protected $filter = ''; + /** + * The order in which documents are returned. Documents can be ordered by + * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] + * object. Leave it unset if ordered by relevance. `order_by` expression is + * case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 8; + */ + protected $order_by = ''; + /** + * Information about the end user. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + */ + protected $user_info = null; + /** + * Facet specifications for faceted search. If empty, no facets are returned. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + */ + private $facet_specs; + /** + * Boost specification to boost certain documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + */ + protected $boost_spec = null; + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + */ + private $params; + /** + * The query expansion specification that specifies the conditions under which + * query expansion occurs. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + */ + protected $query_expansion_spec = null; + /** + * The spell correction specification that specifies the mode under + * which spell correction takes effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + */ + protected $spell_correction_spec = null; + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + */ + protected $user_pseudo_id = ''; + /** + * A specification for configuring the behavior of content search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + */ + protected $content_search_spec = null; + /** + * Whether to turn on safe search. This is only supported for + * website search. + * + * Generated from protobuf field bool safe_search = 20; + */ + protected $safe_search = false; + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + */ + private $user_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serving_config + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @type string $branch + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * @type string $query + * Raw search query. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $image_query + * Raw image query. + * @type int $page_size + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 are coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type string $page_token + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * @type int $offset + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API + * as relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * is unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type string $filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @type string $order_by + * The order in which documents are returned. Documents can be ordered by + * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] + * object. Leave it unset if ordered by relevance. `order_by` expression is + * case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @type \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $user_info + * Information about the end user. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec>|\Google\Protobuf\Internal\RepeatedField $facet_specs + * Facet specifications for faceted search. If empty, no facets are returned. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $boost_spec + * Boost specification to boost certain documents. + * @type array|\Google\Protobuf\Internal\MapField $params + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $query_expansion_spec + * The query expansion specification that specifies the conditions under which + * query expansion occurs. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $spell_correction_spec + * The spell correction specification that specifies the mode under + * which spell correction takes effect. + * @type string $user_pseudo_id + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $content_search_spec + * A specification for configuring the behavior of content search. + * @type bool $safe_search + * Whether to turn on safe search. This is only supported for + * website search. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getBranch() + { + return $this->branch; + } + + /** + * The branch resource name, such as + * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * + * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBranch($var) + { + GPBUtil::checkString($var, True); + $this->branch = $var; + + return $this; + } + + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Raw search query. + * + * Generated from protobuf field string query = 3; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery|null + */ + public function getImageQuery() + { + return $this->image_query; + } + + public function hasImageQuery() + { + return isset($this->image_query); + } + + public function clearImageQuery() + { + unset($this->image_query); + } + + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $var + * @return $this + */ + public function setImageQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery::class); + $this->image_query = $var; + + return $this; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 are coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 are coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API + * as relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * is unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API + * as relevant) in search results. This field is only considered if + * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * is unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 offset = 6; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string filter = 7; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string filter = 7; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The order in which documents are returned. Documents can be ordered by + * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] + * object. Leave it unset if ordered by relevance. `order_by` expression is + * case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 8; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order in which documents are returned. Documents can be ordered by + * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] + * object. Leave it unset if ordered by relevance. `order_by` expression is + * case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 8; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Information about the end user. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * @return \Google\Cloud\DiscoveryEngine\V1beta\UserInfo|null + */ + public function getUserInfo() + { + return $this->user_info; + } + + public function hasUserInfo() + { + return isset($this->user_info); + } + + public function clearUserInfo() + { + unset($this->user_info); + } + + /** + * Information about the end user. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * @param \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $var + * @return $this + */ + public function setUserInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserInfo::class); + $this->user_info = $var; + + return $this; + } + + /** + * Facet specifications for faceted search. If empty, no facets are returned. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFacetSpecs() + { + return $this->facet_specs; + } + + /** + * Facet specifications for faceted search. If empty, no facets are returned. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFacetSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec::class); + $this->facet_specs = $arr; + + return $this; + } + + /** + * Boost specification to boost certain documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec|null + */ + public function getBoostSpec() + { + return $this->boost_spec; + } + + public function hasBoostSpec() + { + return isset($this->boost_spec); + } + + public function clearBoostSpec() + { + unset($this->boost_spec); + } + + /** + * Boost specification to boost certain documents. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $var + * @return $this + */ + public function setBoostSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec::class); + $this->boost_spec = $var; + + return $this; + } + + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * Additional search parameters. + * For public website search only, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * + * Generated from protobuf field map params = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->params = $arr; + + return $this; + } + + /** + * The query expansion specification that specifies the conditions under which + * query expansion occurs. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec|null + */ + public function getQueryExpansionSpec() + { + return $this->query_expansion_spec; + } + + public function hasQueryExpansionSpec() + { + return isset($this->query_expansion_spec); + } + + public function clearQueryExpansionSpec() + { + unset($this->query_expansion_spec); + } + + /** + * The query expansion specification that specifies the conditions under which + * query expansion occurs. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $var + * @return $this + */ + public function setQueryExpansionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec::class); + $this->query_expansion_spec = $var; + + return $this; + } + + /** + * The spell correction specification that specifies the mode under + * which spell correction takes effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec|null + */ + public function getSpellCorrectionSpec() + { + return $this->spell_correction_spec; + } + + public function hasSpellCorrectionSpec() + { + return isset($this->spell_correction_spec); + } + + public function clearSpellCorrectionSpec() + { + unset($this->spell_correction_spec); + } + + /** + * The spell correction specification that specifies the mode under + * which spell correction takes effect. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $var + * @return $this + */ + public function setSpellCorrectionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec::class); + $this->spell_correction_spec = $var; + + return $this; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * and + * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 15; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * A specification for configuring the behavior of content search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec|null + */ + public function getContentSearchSpec() + { + return $this->content_search_spec; + } + + public function hasContentSearchSpec() + { + return isset($this->content_search_spec); + } + + public function clearContentSearchSpec() + { + unset($this->content_search_spec); + } + + /** + * A specification for configuring the behavior of content search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $var + * @return $this + */ + public function setContentSearchSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec::class); + $this->content_search_spec = $var; + + return $this; + } + + /** + * Whether to turn on safe search. This is only supported for + * website search. + * + * Generated from protobuf field bool safe_search = 20; + * @return bool + */ + public function getSafeSearch() + { + return $this->safe_search; + } + + /** + * Whether to turn on safe search. This is only supported for + * website search. + * + * Generated from protobuf field bool safe_search = 20; + * @param bool $var + * @return $this + */ + public function setSafeSearch($var) + { + GPBUtil::checkBool($var); + $this->safe_search = $var; + + return $this; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 22; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php new file mode 100644 index 000000000000..dda79dcf64b3 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php @@ -0,0 +1,82 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + */ +class BoostSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Condition boost specifications. If a document matches multiple conditions + * in the specifictions, boost scores from these specifications are all + * applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + */ + private $condition_boost_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $condition_boost_specs + * Condition boost specifications. If a document matches multiple conditions + * in the specifictions, boost scores from these specifications are all + * applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Condition boost specifications. If a document matches multiple conditions + * in the specifictions, boost scores from these specifications are all + * applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditionBoostSpecs() + { + return $this->condition_boost_specs; + } + + /** + * Condition boost specifications. If a document matches multiple conditions + * in the specifictions, boost scores from these specifications are all + * applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditionBoostSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec::class); + $this->condition_boost_specs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BoostSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_BoostSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php new file mode 100644 index 000000000000..a56b23c9ae40 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php @@ -0,0 +1,188 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + */ +class ConditionBoostSpec extends \Google\Protobuf\Internal\Message +{ + /** + * An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. See + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * for detail syntax and limitations. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1; + */ + protected $condition = ''; + /** + * Strength of the condition boost, which should be in [-1, 1]. Negative + * boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2; + */ + protected $boost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $condition + * An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. See + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * for detail syntax and limitations. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * @type float $boost + * Strength of the condition boost, which should be in [-1, 1]. Negative + * boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. See + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * for detail syntax and limitations. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. See + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * for detail syntax and limitations. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Strength of the condition boost, which should be in [-1, 1]. Negative + * boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2; + * @return float + */ + public function getBoost() + { + return $this->boost; + } + + /** + * Strength of the condition boost, which should be in [-1, 1]. Negative + * boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2; + * @param float $var + * @return $this + */ + public function setBoost($var) + { + GPBUtil::checkFloat($var); + $this->boost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConditionBoostSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_BoostSpec_ConditionBoostSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php new file mode 100644 index 000000000000..80e063bf65c1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php @@ -0,0 +1,180 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + */ +class ContentSearchSpec extends \Google\Protobuf\Internal\Message +{ + /** + * If `snippetSpec` is not specified, snippets are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + */ + protected $snippet_spec = null; + /** + * If `summarySpec` is not specified, summaries are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + */ + protected $summary_spec = null; + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + */ + protected $extractive_content_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $snippet_spec + * If `snippetSpec` is not specified, snippets are not included in the + * search response. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec $summary_spec + * If `summarySpec` is not specified, summaries are not included in the + * search response. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $extractive_content_spec + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * If `snippetSpec` is not specified, snippets are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec|null + */ + public function getSnippetSpec() + { + return $this->snippet_spec; + } + + public function hasSnippetSpec() + { + return isset($this->snippet_spec); + } + + public function clearSnippetSpec() + { + unset($this->snippet_spec); + } + + /** + * If `snippetSpec` is not specified, snippets are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $var + * @return $this + */ + public function setSnippetSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec::class); + $this->snippet_spec = $var; + + return $this; + } + + /** + * If `summarySpec` is not specified, summaries are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec|null + */ + public function getSummarySpec() + { + return $this->summary_spec; + } + + public function hasSummarySpec() + { + return isset($this->summary_spec); + } + + public function clearSummarySpec() + { + unset($this->summary_spec); + } + + /** + * If `summarySpec` is not specified, summaries are not included in the + * search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec $var + * @return $this + */ + public function setSummarySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec::class); + $this->summary_spec = $var; + + return $this; + } + + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec|null + */ + public function getExtractiveContentSpec() + { + return $this->extractive_content_spec; + } + + public function hasExtractiveContentSpec() + { + return isset($this->extractive_content_spec); + } + + public function clearExtractiveContentSpec() + { + unset($this->extractive_content_spec); + } + + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $var + * @return $this + */ + public function setExtractiveContentSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec::class); + $this->extractive_content_spec = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentSearchSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php new file mode 100644 index 000000000000..e7c0b66b6e7d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php @@ -0,0 +1,205 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + */ +class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + */ + protected $max_extractive_answer_count = 0; + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + */ + protected $max_extractive_segment_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_extractive_answer_count + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * @type int $max_extractive_segment_count + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + * @return int + */ + public function getMaxExtractiveAnswerCount() + { + return $this->max_extractive_answer_count; + } + + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + * @param int $var + * @return $this + */ + public function setMaxExtractiveAnswerCount($var) + { + GPBUtil::checkInt32($var); + $this->max_extractive_answer_count = $var; + + return $this; + } + + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + * @return int + */ + public function getMaxExtractiveSegmentCount() + { + return $this->max_extractive_segment_count; + } + + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + * @param int $var + * @return $this + */ + public function setMaxExtractiveSegmentCount($var) + { + GPBUtil::checkInt32($var); + $this->max_extractive_segment_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExtractiveContentSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_ExtractiveContentSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php new file mode 100644 index 000000000000..9a226dc4194b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php @@ -0,0 +1,168 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + */ +class SnippetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. + * + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; + * @deprecated + */ + protected $max_snippet_count = 0; + /** + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. + * + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; + * @deprecated + */ + protected $reference_only = false; + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + */ + protected $return_snippet = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_snippet_count + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. + * @type bool $reference_only + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. + * @type bool $return_snippet + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. + * + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; + * @return int + * @deprecated + */ + public function getMaxSnippetCount() + { + @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); + return $this->max_snippet_count; + } + + /** + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. + * + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setMaxSnippetCount($var) + { + @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->max_snippet_count = $var; + + return $this; + } + + /** + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. + * + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getReferenceOnly() + { + @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); + return $this->reference_only; + } + + /** + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. + * + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setReferenceOnly($var) + { + @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->reference_only = $var; + + return $this; + } + + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + * @return bool + */ + public function getReturnSnippet() + { + return $this->return_snippet; + } + + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + * @param bool $var + * @return $this + */ + public function setReturnSnippet($var) + { + GPBUtil::checkBool($var); + $this->return_snippet = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SnippetSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_SnippetSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php new file mode 100644 index 000000000000..7455f8e07b70 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php @@ -0,0 +1,301 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + */ +class SummarySpec extends \Google\Protobuf\Internal\Message +{ + /** + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. + * + * Generated from protobuf field int32 summary_result_count = 1; + */ + protected $summary_result_count = 0; + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + */ + protected $include_citations = false; + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + */ + protected $ignore_adversarial_query = false; + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + */ + protected $ignore_non_summary_seeking_query = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $summary_result_count + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. + * @type bool $include_citations + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * @type bool $ignore_adversarial_query + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * @type bool $ignore_non_summary_seeking_query + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. + * + * Generated from protobuf field int32 summary_result_count = 1; + * @return int + */ + public function getSummaryResultCount() + { + return $this->summary_result_count; + } + + /** + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. + * + * Generated from protobuf field int32 summary_result_count = 1; + * @param int $var + * @return $this + */ + public function setSummaryResultCount($var) + { + GPBUtil::checkInt32($var); + $this->summary_result_count = $var; + + return $this; + } + + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + * @return bool + */ + public function getIncludeCitations() + { + return $this->include_citations; + } + + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + * @param bool $var + * @return $this + */ + public function setIncludeCitations($var) + { + GPBUtil::checkBool($var); + $this->include_citations = $var; + + return $this; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + * @return bool + */ + public function getIgnoreAdversarialQuery() + { + return $this->ignore_adversarial_query; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + * @param bool $var + * @return $this + */ + public function setIgnoreAdversarialQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_adversarial_query = $var; + + return $this; + } + + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + * @return bool + */ + public function getIgnoreNonSummarySeekingQuery() + { + return $this->ignore_non_summary_seeking_query; + } + + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + * @param bool $var + * @return $this + */ + public function setIgnoreNonSummarySeekingQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_non_summary_seeking_query = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SummarySpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_SummarySpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php new file mode 100644 index 000000000000..8b917184f22b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php @@ -0,0 +1,362 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + */ +class FacetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The facet key specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $facet_key = null; + /** + * Maximum of facet values that should be returned for this facet. If + * unspecified, defaults to 20. The maximum allowed value is 300. Values + * above 300 are coerced to 300. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 limit = 2; + */ + protected $limit = 0; + /** + * List of keys to exclude when faceting. + * By default, + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * is not excluded from the filter unless it is listed in this field. + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 documents with the color facet "Red" + * and 200 documents with the color facet "Blue". A query containing the + * filter "color:ANY("Red")" and having "color" as + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * would by default return only "Red" documents in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue documents available, "Blue" would not be shown as an + * available facet value. + * If "color" is listed in "excludedFilterKeys", then the query returns the + * facet values "Red" with count 100 and "Blue" with count 200, because the + * "color" key is now excluded from the filter. Because this field doesn't + * affect search results, the search results are still correctly filtered to + * return only "Red" documents. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated string excluded_filter_keys = 3; + */ + private $excluded_filter_keys; + /** + * Enables dynamic position for this facet. If set to true, the position of + * this facet among all facets in the response is determined automatically. + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before + * the facets with dynamic position enable and all dynamic facets. + * For example, you may always want to have rating facet returned in + * the response, but it's not necessarily to always display the rating facet + * at the top. In that case, you can set enable_dynamic_position to true so + * that the position of rating facet in response is determined + * automatically. + * Another example, assuming you have the following facets in the request: + * * "rating", enable_dynamic_position = true + * * "price", enable_dynamic_position = false + * * "brands", enable_dynamic_position = false + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be + * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + * "rating") depends on how API orders "gender" and "rating" facets. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. + * + * Generated from protobuf field bool enable_dynamic_position = 4; + */ + protected $enable_dynamic_position = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey $facet_key + * Required. The facet key specification. + * @type int $limit + * Maximum of facet values that should be returned for this facet. If + * unspecified, defaults to 20. The maximum allowed value is 300. Values + * above 300 are coerced to 300. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_filter_keys + * List of keys to exclude when faceting. + * By default, + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * is not excluded from the filter unless it is listed in this field. + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 documents with the color facet "Red" + * and 200 documents with the color facet "Blue". A query containing the + * filter "color:ANY("Red")" and having "color" as + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * would by default return only "Red" documents in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue documents available, "Blue" would not be shown as an + * available facet value. + * If "color" is listed in "excludedFilterKeys", then the query returns the + * facet values "Red" with count 100 and "Blue" with count 200, because the + * "color" key is now excluded from the filter. Because this field doesn't + * affect search results, the search results are still correctly filtered to + * return only "Red" documents. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * @type bool $enable_dynamic_position + * Enables dynamic position for this facet. If set to true, the position of + * this facet among all facets in the response is determined automatically. + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before + * the facets with dynamic position enable and all dynamic facets. + * For example, you may always want to have rating facet returned in + * the response, but it's not necessarily to always display the rating facet + * at the top. In that case, you can set enable_dynamic_position to true so + * that the position of rating facet in response is determined + * automatically. + * Another example, assuming you have the following facets in the request: + * * "rating", enable_dynamic_position = true + * * "price", enable_dynamic_position = false + * * "brands", enable_dynamic_position = false + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be + * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + * "rating") depends on how API orders "gender" and "rating" facets. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The facet key specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey|null + */ + public function getFacetKey() + { + return $this->facet_key; + } + + public function hasFacetKey() + { + return isset($this->facet_key); + } + + public function clearFacetKey() + { + unset($this->facet_key); + } + + /** + * Required. The facet key specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey $var + * @return $this + */ + public function setFacetKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey::class); + $this->facet_key = $var; + + return $this; + } + + /** + * Maximum of facet values that should be returned for this facet. If + * unspecified, defaults to 20. The maximum allowed value is 300. Values + * above 300 are coerced to 300. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 limit = 2; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Maximum of facet values that should be returned for this facet. If + * unspecified, defaults to 20. The maximum allowed value is 300. Values + * above 300 are coerced to 300. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field int32 limit = 2; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt32($var); + $this->limit = $var; + + return $this; + } + + /** + * List of keys to exclude when faceting. + * By default, + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * is not excluded from the filter unless it is listed in this field. + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 documents with the color facet "Red" + * and 200 documents with the color facet "Blue". A query containing the + * filter "color:ANY("Red")" and having "color" as + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * would by default return only "Red" documents in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue documents available, "Blue" would not be shown as an + * available facet value. + * If "color" is listed in "excludedFilterKeys", then the query returns the + * facet values "Red" with count 100 and "Blue" with count 200, because the + * "color" key is now excluded from the filter. Because this field doesn't + * affect search results, the search results are still correctly filtered to + * return only "Red" documents. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated string excluded_filter_keys = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedFilterKeys() + { + return $this->excluded_filter_keys; + } + + /** + * List of keys to exclude when faceting. + * By default, + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * is not excluded from the filter unless it is listed in this field. + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 documents with the color facet "Red" + * and 200 documents with the color facet "Blue". A query containing the + * filter "color:ANY("Red")" and having "color" as + * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + * would by default return only "Red" documents in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue documents available, "Blue" would not be shown as an + * available facet value. + * If "color" is listed in "excludedFilterKeys", then the query returns the + * facet values "Red" with count 100 and "Blue" with count 200, because the + * "color" key is now excluded from the filter. Because this field doesn't + * affect search results, the search results are still correctly filtered to + * return only "Red" documents. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * + * Generated from protobuf field repeated string excluded_filter_keys = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedFilterKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_filter_keys = $arr; + + return $this; + } + + /** + * Enables dynamic position for this facet. If set to true, the position of + * this facet among all facets in the response is determined automatically. + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before + * the facets with dynamic position enable and all dynamic facets. + * For example, you may always want to have rating facet returned in + * the response, but it's not necessarily to always display the rating facet + * at the top. In that case, you can set enable_dynamic_position to true so + * that the position of rating facet in response is determined + * automatically. + * Another example, assuming you have the following facets in the request: + * * "rating", enable_dynamic_position = true + * * "price", enable_dynamic_position = false + * * "brands", enable_dynamic_position = false + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be + * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + * "rating") depends on how API orders "gender" and "rating" facets. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. + * + * Generated from protobuf field bool enable_dynamic_position = 4; + * @return bool + */ + public function getEnableDynamicPosition() + { + return $this->enable_dynamic_position; + } + + /** + * Enables dynamic position for this facet. If set to true, the position of + * this facet among all facets in the response is determined automatically. + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before + * the facets with dynamic position enable and all dynamic facets. + * For example, you may always want to have rating facet returned in + * the response, but it's not necessarily to always display the rating facet + * at the top. In that case, you can set enable_dynamic_position to true so + * that the position of rating facet in response is determined + * automatically. + * Another example, assuming you have the following facets in the request: + * * "rating", enable_dynamic_position = true + * * "price", enable_dynamic_position = false + * * "brands", enable_dynamic_position = false + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be + * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + * "rating") depends on how API orders "gender" and "rating" facets. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. + * + * Generated from protobuf field bool enable_dynamic_position = 4; + * @param bool $var + * @return $this + */ + public function setEnableDynamicPosition($var) + { + GPBUtil::checkBool($var); + $this->enable_dynamic_position = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FacetSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_FacetSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php new file mode 100644 index 000000000000..8047689f4d3d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php @@ -0,0 +1,394 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + */ +class FacetKey extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Supported textual and numerical facet keys in + * [Document][google.cloud.discoveryengine.v1beta.Document] object, over + * which the facet values are computed. Facet key is case-sensitive. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Set only if values should be bucketed into intervals. Must be set + * for facets with numerical values. Must not be set for facet with text + * values. Maximum number of intervals is 30. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; + */ + private $intervals; + /** + * Only get facet for the given restricted values. Only supported on + * textual fields. For example, suppose "category" has three values + * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum + * is 10. + * + * Generated from protobuf field repeated string restricted_values = 3; + */ + private $restricted_values; + /** + * Only get facet values that start with the given string prefix. For + * example, suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + * "category" facet only contains "Action > 2022" and "Action > 2021". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string prefixes = 4; + */ + private $prefixes; + /** + * Only get facet values that contains the given strings. For example, + * suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string contains = 5; + */ + private $contains; + /** + * True to make facet keys case insensitive when getting faceting + * values with prefixes or contains; false otherwise. + * + * Generated from protobuf field bool case_insensitive = 6; + */ + protected $case_insensitive = false; + /** + * The order in which documents are returned. + * Allowed values are: + * * "count desc", which means order by + * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] + * descending. + * * "value desc", which means order by + * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] + * descending. + * Only applies to textual facets. + * If not set, textual values are sorted in [natural + * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + * intervals are sorted in the order given by + * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * + * Generated from protobuf field string order_by = 7; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. Supported textual and numerical facet keys in + * [Document][google.cloud.discoveryengine.v1beta.Document] object, over + * which the facet values are computed. Facet key is case-sensitive. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Interval>|\Google\Protobuf\Internal\RepeatedField $intervals + * Set only if values should be bucketed into intervals. Must be set + * for facets with numerical values. Must not be set for facet with text + * values. Maximum number of intervals is 30. + * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_values + * Only get facet for the given restricted values. Only supported on + * textual fields. For example, suppose "category" has three values + * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum + * is 10. + * @type array|\Google\Protobuf\Internal\RepeatedField $prefixes + * Only get facet values that start with the given string prefix. For + * example, suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + * "category" facet only contains "Action > 2022" and "Action > 2021". + * Only supported on textual fields. Maximum is 10. + * @type array|\Google\Protobuf\Internal\RepeatedField $contains + * Only get facet values that contains the given strings. For example, + * suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + * Only supported on textual fields. Maximum is 10. + * @type bool $case_insensitive + * True to make facet keys case insensitive when getting faceting + * values with prefixes or contains; false otherwise. + * @type string $order_by + * The order in which documents are returned. + * Allowed values are: + * * "count desc", which means order by + * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] + * descending. + * * "value desc", which means order by + * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] + * descending. + * Only applies to textual facets. + * If not set, textual values are sorted in [natural + * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + * intervals are sorted in the order given by + * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Supported textual and numerical facet keys in + * [Document][google.cloud.discoveryengine.v1beta.Document] object, over + * which the facet values are computed. Facet key is case-sensitive. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. Supported textual and numerical facet keys in + * [Document][google.cloud.discoveryengine.v1beta.Document] object, over + * which the facet values are computed. Facet key is case-sensitive. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Set only if values should be bucketed into intervals. Must be set + * for facets with numerical values. Must not be set for facet with text + * values. Maximum number of intervals is 30. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntervals() + { + return $this->intervals; + } + + /** + * Set only if values should be bucketed into intervals. Must be set + * for facets with numerical values. Must not be set for facet with text + * values. Maximum number of intervals is 30. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Interval>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntervals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Interval::class); + $this->intervals = $arr; + + return $this; + } + + /** + * Only get facet for the given restricted values. Only supported on + * textual fields. For example, suppose "category" has three values + * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum + * is 10. + * + * Generated from protobuf field repeated string restricted_values = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestrictedValues() + { + return $this->restricted_values; + } + + /** + * Only get facet for the given restricted values. Only supported on + * textual fields. For example, suppose "category" has three values + * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum + * is 10. + * + * Generated from protobuf field repeated string restricted_values = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestrictedValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->restricted_values = $arr; + + return $this; + } + + /** + * Only get facet values that start with the given string prefix. For + * example, suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + * "category" facet only contains "Action > 2022" and "Action > 2021". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string prefixes = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrefixes() + { + return $this->prefixes; + } + + /** + * Only get facet values that start with the given string prefix. For + * example, suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + * "category" facet only contains "Action > 2022" and "Action > 2021". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string prefixes = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->prefixes = $arr; + + return $this; + } + + /** + * Only get facet values that contains the given strings. For example, + * suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string contains = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContains() + { + return $this->contains; + } + + /** + * Only get facet values that contains the given strings. For example, + * suppose "category" has three values "Action > 2022", + * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + * Only supported on textual fields. Maximum is 10. + * + * Generated from protobuf field repeated string contains = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->contains = $arr; + + return $this; + } + + /** + * True to make facet keys case insensitive when getting faceting + * values with prefixes or contains; false otherwise. + * + * Generated from protobuf field bool case_insensitive = 6; + * @return bool + */ + public function getCaseInsensitive() + { + return $this->case_insensitive; + } + + /** + * True to make facet keys case insensitive when getting faceting + * values with prefixes or contains; false otherwise. + * + * Generated from protobuf field bool case_insensitive = 6; + * @param bool $var + * @return $this + */ + public function setCaseInsensitive($var) + { + GPBUtil::checkBool($var); + $this->case_insensitive = $var; + + return $this; + } + + /** + * The order in which documents are returned. + * Allowed values are: + * * "count desc", which means order by + * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] + * descending. + * * "value desc", which means order by + * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] + * descending. + * Only applies to textual facets. + * If not set, textual values are sorted in [natural + * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + * intervals are sorted in the order given by + * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * + * Generated from protobuf field string order_by = 7; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order in which documents are returned. + * Allowed values are: + * * "count desc", which means order by + * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] + * descending. + * * "value desc", which means order by + * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] + * descending. + * Only applies to textual facets. + * If not set, textual values are sorted in [natural + * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + * intervals are sorted in the order given by + * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * + * Generated from protobuf field string order_by = 7; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FacetKey::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_FacetSpec_FacetKey::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php new file mode 100644 index 000000000000..2ffd4b329b9a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php @@ -0,0 +1,81 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery + */ +class ImageQuery extends \Google\Protobuf\Internal\Message +{ + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_bytes + * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and + * BMP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and + * BMP. + * + * Generated from protobuf field string image_bytes = 1; + * @return string + */ + public function getImageBytes() + { + return $this->readOneof(1); + } + + public function hasImageBytes() + { + return $this->hasOneof(1); + } + + /** + * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and + * BMP. + * + * Generated from protobuf field string image_bytes = 1; + * @param string $var + * @return $this + */ + public function setImageBytes($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageQuery::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ImageQuery::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php new file mode 100644 index 000000000000..c0f7f18f69e1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php @@ -0,0 +1,75 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + */ +class QueryExpansionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; + */ + protected $condition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $condition + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * @return int + */ + public function getCondition() + { + return $this->condition; + } + + /** + * The condition under which query expansion should occur. Default to + * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * @param int $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec\Condition::class); + $this->condition = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryExpansionSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_QueryExpansionSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php new file mode 100644 index 000000000000..d67b604f4317 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition + */ +class Condition +{ + /** + * Unspecified query expansion condition. In this case, server behavior + * defaults to + * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + * + * Generated from protobuf enum CONDITION_UNSPECIFIED = 0; + */ + const CONDITION_UNSPECIFIED = 0; + /** + * Disabled query expansion. Only the exact search query is used, even if + * [SearchResponse.total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + * is zero. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Automatic query expansion built by the Search API. + * + * Generated from protobuf enum AUTO = 2; + */ + const AUTO = 2; + + private static $valueToName = [ + self::CONDITION_UNSPECIFIED => 'CONDITION_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::AUTO => 'AUTO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Condition::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_QueryExpansionSpec_Condition::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php new file mode 100644 index 000000000000..c370a7cd3c26 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php @@ -0,0 +1,78 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + */ +class SpellCorrectionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode under which spell correction should take effect to + * replace the original search query. Default to + * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec\Mode::class); + $this->mode = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpellCorrectionSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_SpellCorrectionSpec::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php new file mode 100644 index 000000000000..c6f8081c457b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php @@ -0,0 +1,70 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode + */ +class Mode +{ + /** + * Unspecified spell correction mode. In this case, server behavior + * defaults to + * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Search API will try to find a spell suggestion if there + * is any and put in the + * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1beta.SearchResponse.corrected_query]. + * The spell suggestion will not be used as the search query. + * + * Generated from protobuf enum SUGGESTION_ONLY = 1; + */ + const SUGGESTION_ONLY = 1; + /** + * Automatic spell correction built by the Search API. Search will + * be based on the corrected query if found. + * + * Generated from protobuf enum AUTO = 2; + */ + const AUTO = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::SUGGESTION_ONLY => 'SUGGESTION_ONLY', + self::AUTO => 'AUTO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_SpellCorrectionSpec_Mode::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php new file mode 100644 index 000000000000..b044661bde56 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php @@ -0,0 +1,479 @@ +google.cloud.discoveryengine.v1beta.SearchResponse + */ +class SearchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; + */ + private $results; + /** + * Results of facets requested by user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; + */ + private $facets; + /** + * Guided search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; + */ + protected $guided_search_result = null; + /** + * The estimated total count of matched items irrespective of pagination. The + * count of + * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + */ + protected $attribution_token = ''; + /** + * The URI of a customer-defined redirect page. If redirect action is + * triggered, no search is performed, and only + * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] + * and + * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] + * are set in the response. + * + * Generated from protobuf field string redirect_uri = 12; + */ + protected $redirect_uri = ''; + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + */ + protected $next_page_token = ''; + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + */ + protected $corrected_query = ''; + /** + * A summary as part of the search results. + * This field is only returned if + * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + * is set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; + */ + protected $summary = null; + /** + * Controls applied as part of the Control service. + * + * Generated from protobuf field repeated string applied_controls = 10; + */ + private $applied_controls; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $results + * A list of matched documents. The order represents the ranking. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet>|\Google\Protobuf\Internal\RepeatedField $facets + * Results of facets requested by user. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult $guided_search_result + * Guided search result. + * @type int $total_size + * The estimated total count of matched items irrespective of pagination. The + * count of + * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + * that matches. + * @type string $attribution_token + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this search, which enables accurate attribution of search model + * performance. + * @type string $redirect_uri + * The URI of a customer-defined redirect page. If redirect action is + * triggered, no search is performed, and only + * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] + * and + * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] + * are set in the response. + * @type string $next_page_token + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * @type string $corrected_query + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary $summary + * A summary as part of the search results. + * This field is only returned if + * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + * is set. + * @type array|\Google\Protobuf\Internal\RepeatedField $applied_controls + * Controls applied as part of the Control service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * A list of matched documents. The order represents the ranking. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult::class); + $this->results = $arr; + + return $this; + } + + /** + * Results of facets requested by user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFacets() + { + return $this->facets; + } + + /** + * Results of facets requested by user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFacets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet::class); + $this->facets = $arr; + + return $this; + } + + /** + * Guided search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult|null + */ + public function getGuidedSearchResult() + { + return $this->guided_search_result; + } + + public function hasGuidedSearchResult() + { + return isset($this->guided_search_result); + } + + public function clearGuidedSearchResult() + { + unset($this->guided_search_result); + } + + /** + * Guided search result. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult $var + * @return $this + */ + public function setGuidedSearchResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult::class); + $this->guided_search_result = $var; + + return $this; + } + + /** + * The estimated total count of matched items irrespective of pagination. The + * count of + * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The estimated total count of matched items irrespective of pagination. The + * count of + * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + * returned by pagination may be less than the + * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + * that matches. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * A unique search token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + * from this search, which enables accurate attribution of search model + * performance. + * + * Generated from protobuf field string attribution_token = 4; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * The URI of a customer-defined redirect page. If redirect action is + * triggered, no search is performed, and only + * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] + * and + * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] + * are set in the response. + * + * Generated from protobuf field string redirect_uri = 12; + * @return string + */ + public function getRedirectUri() + { + return $this->redirect_uri; + } + + /** + * The URI of a customer-defined redirect page. If redirect action is + * triggered, no search is performed, and only + * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] + * and + * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] + * are set in the response. + * + * Generated from protobuf field string redirect_uri = 12; + * @param string $var + * @return $this + */ + public function setRedirectUri($var) + { + GPBUtil::checkString($var, True); + $this->redirect_uri = $var; + + return $this; + } + + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as + * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + * to retrieve the next page. If this field is omitted, there are no + * subsequent pages. + * + * Generated from protobuf field string next_page_token = 5; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + * @return string + */ + public function getCorrectedQuery() + { + return $this->corrected_query; + } + + /** + * Contains the spell corrected query, if found. If the spell correction type + * is AUTOMATIC, then the search results are based on corrected_query. + * Otherwise the original query is used for search. + * + * Generated from protobuf field string corrected_query = 7; + * @param string $var + * @return $this + */ + public function setCorrectedQuery($var) + { + GPBUtil::checkString($var, True); + $this->corrected_query = $var; + + return $this; + } + + /** + * A summary as part of the search results. + * This field is only returned if + * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + * is set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary|null + */ + public function getSummary() + { + return $this->summary; + } + + public function hasSummary() + { + return isset($this->summary); + } + + public function clearSummary() + { + unset($this->summary); + } + + /** + * A summary as part of the search results. + * This field is only returned if + * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + * is set. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary::class); + $this->summary = $var; + + return $this; + } + + /** + * Controls applied as part of the Control service. + * + * Generated from protobuf field repeated string applied_controls = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedControls() + { + return $this->applied_controls; + } + + /** + * Controls applied as part of the Control service. + * + * Generated from protobuf field repeated string applied_controls = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedControls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applied_controls = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php new file mode 100644 index 000000000000..87856929100e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php @@ -0,0 +1,142 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.Facet + */ +class Facet extends \Google\Protobuf\Internal\Message +{ + /** + * The key for this facet. E.g., "colors" or "price". It matches + * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The facet values for this field. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; + */ + private $values; + /** + * Whether the facet is dynamically generated. + * + * Generated from protobuf field bool dynamic_facet = 3; + */ + protected $dynamic_facet = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The key for this facet. E.g., "colors" or "price". It matches + * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue>|\Google\Protobuf\Internal\RepeatedField $values + * The facet values for this field. + * @type bool $dynamic_facet + * Whether the facet is dynamically generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The key for this facet. E.g., "colors" or "price". It matches + * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key for this facet. E.g., "colors" or "price". It matches + * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The facet values for this field. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The facet values for this field. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue::class); + $this->values = $arr; + + return $this; + } + + /** + * Whether the facet is dynamically generated. + * + * Generated from protobuf field bool dynamic_facet = 3; + * @return bool + */ + public function getDynamicFacet() + { + return $this->dynamic_facet; + } + + /** + * Whether the facet is dynamically generated. + * + * Generated from protobuf field bool dynamic_facet = 3; + * @param bool $var + * @return $this + */ + public function setDynamicFacet($var) + { + GPBUtil::checkBool($var); + $this->dynamic_facet = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Facet::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Facet::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php new file mode 100644 index 000000000000..a061654a1dd4 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php @@ -0,0 +1,151 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + */ +class FacetValue extends \Google\Protobuf\Internal\Message +{ + /** + * Number of items that have this facet value. + * + * Generated from protobuf field int64 count = 3; + */ + protected $count = 0; + protected $facet_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * Text value of a facet, such as "Black" for facet "colors". + * @type \Google\Cloud\DiscoveryEngine\V1beta\Interval $interval + * Interval value for a facet, such as [10, 20) for facet "price". It + * matches + * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * @type int|string $count + * Number of items that have this facet value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Text value of a facet, such as "Black" for facet "colors". + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->readOneof(1); + } + + public function hasValue() + { + return $this->hasOneof(1); + } + + /** + * Text value of a facet, such as "Black" for facet "colors". + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Interval value for a facet, such as [10, 20) for facet "price". It + * matches + * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Interval interval = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Interval|null + */ + public function getInterval() + { + return $this->readOneof(2); + } + + public function hasInterval() + { + return $this->hasOneof(2); + } + + /** + * Interval value for a facet, such as [10, 20) for facet "price". It + * matches + * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Interval interval = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Interval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Interval::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Number of items that have this facet value. + * + * Generated from protobuf field int64 count = 3; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Number of items that have this facet value. + * + * Generated from protobuf field int64 count = 3; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * @return string + */ + public function getFacetValue() + { + return $this->whichOneof("facet_value"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FacetValue::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Facet_FacetValue::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php new file mode 100644 index 000000000000..fd88c9f9b919 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php @@ -0,0 +1,105 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + */ +class GuidedSearchResult extends \Google\Protobuf\Internal\Message +{ + /** + * A list of ranked refinement attributes. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + */ + private $refinement_attributes; + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + */ + private $follow_up_questions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute>|\Google\Protobuf\Internal\RepeatedField $refinement_attributes + * A list of ranked refinement attributes. + * @type array|\Google\Protobuf\Internal\RepeatedField $follow_up_questions + * Suggested follow-up questions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * A list of ranked refinement attributes. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRefinementAttributes() + { + return $this->refinement_attributes; + } + + /** + * A list of ranked refinement attributes. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRefinementAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute::class); + $this->refinement_attributes = $arr; + + return $this; + } + + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFollowUpQuestions() + { + return $this->follow_up_questions; + } + + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFollowUpQuestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->follow_up_questions = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GuidedSearchResult::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_GuidedSearchResult::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php new file mode 100644 index 000000000000..2dacacbe760f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php @@ -0,0 +1,104 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + */ +class RefinementAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * Attribute key used to refine the results e.g. 'movie_type'. + * + * Generated from protobuf field string attribute_key = 1; + */ + protected $attribute_key = ''; + /** + * Attribute value used to refine the results e.g. 'drama'. + * + * Generated from protobuf field string attribute_value = 2; + */ + protected $attribute_value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute_key + * Attribute key used to refine the results e.g. 'movie_type'. + * @type string $attribute_value + * Attribute value used to refine the results e.g. 'drama'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Attribute key used to refine the results e.g. 'movie_type'. + * + * Generated from protobuf field string attribute_key = 1; + * @return string + */ + public function getAttributeKey() + { + return $this->attribute_key; + } + + /** + * Attribute key used to refine the results e.g. 'movie_type'. + * + * Generated from protobuf field string attribute_key = 1; + * @param string $var + * @return $this + */ + public function setAttributeKey($var) + { + GPBUtil::checkString($var, True); + $this->attribute_key = $var; + + return $this; + } + + /** + * Attribute value used to refine the results e.g. 'drama'. + * + * Generated from protobuf field string attribute_value = 2; + * @return string + */ + public function getAttributeValue() + { + return $this->attribute_value; + } + + /** + * Attribute value used to refine the results e.g. 'drama'. + * + * Generated from protobuf field string attribute_value = 2; + * @param string $var + * @return $this + */ + public function setAttributeValue($var) + { + GPBUtil::checkString($var, True); + $this->attribute_value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RefinementAttribute::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_GuidedSearchResult_RefinementAttribute::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php new file mode 100644 index 000000000000..21d63cea47cb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php @@ -0,0 +1,122 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + */ +class SearchResult extends \Google\Protobuf\Internal\Message +{ + /** + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + */ + protected $document = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1beta.Document]. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + * searched [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The document data snippet in the search response. Only fields that are + * marked as retrievable are populated. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->document = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchResult::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_SearchResult::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php new file mode 100644 index 000000000000..cd250b9d01d9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php @@ -0,0 +1,108 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.Summary + */ +class Summary extends \Google\Protobuf\Internal\Message +{ + /** + * The summary content. + * + * Generated from protobuf field string summary_text = 1; + */ + protected $summary_text = ''; + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + */ + private $summary_skipped_reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $summary_text + * The summary content. + * @type array|\Google\Protobuf\Internal\RepeatedField $summary_skipped_reasons + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The summary content. + * + * Generated from protobuf field string summary_text = 1; + * @return string + */ + public function getSummaryText() + { + return $this->summary_text; + } + + /** + * The summary content. + * + * Generated from protobuf field string summary_text = 1; + * @param string $var + * @return $this + */ + public function setSummaryText($var) + { + GPBUtil::checkString($var, True); + $this->summary_text = $var; + + return $this; + } + + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSummarySkippedReasons() + { + return $this->summary_skipped_reasons; + } + + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSummarySkippedReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\SummarySkippedReason::class); + $this->summary_skipped_reasons = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Summary::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Summary::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php new file mode 100644 index 000000000000..a4e595d4fed7 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php @@ -0,0 +1,80 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason + */ +class SummarySkippedReason +{ + /** + * Default value. The summary skipped reason is not specified. + * + * Generated from protobuf enum SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0; + */ + const SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0; + /** + * The adversarial query ignored case. + * Only populated when + * [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query] + * is set to `true`. + * + * Generated from protobuf enum ADVERSARIAL_QUERY_IGNORED = 1; + */ + const ADVERSARIAL_QUERY_IGNORED = 1; + /** + * The non-summary seeking query ignored case. + * Only populated when + * [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query] + * is set to `true`. + * + * Generated from protobuf enum NON_SUMMARY_SEEKING_QUERY_IGNORED = 2; + */ + const NON_SUMMARY_SEEKING_QUERY_IGNORED = 2; + /** + * The out-of-domain query ignored case. + * Google skips the summary if there are no high-relevance search results. + * For example, the data store contains facts about company A but the + * user query is asking questions about company B. + * + * Generated from protobuf enum OUT_OF_DOMAIN_QUERY_IGNORED = 3; + */ + const OUT_OF_DOMAIN_QUERY_IGNORED = 3; + + private static $valueToName = [ + self::SUMMARY_SKIPPED_REASON_UNSPECIFIED => 'SUMMARY_SKIPPED_REASON_UNSPECIFIED', + self::ADVERSARIAL_QUERY_IGNORED => 'ADVERSARIAL_QUERY_IGNORED', + self::NON_SUMMARY_SEEKING_QUERY_IGNORED => 'NON_SUMMARY_SEEKING_QUERY_IGNORED', + self::OUT_OF_DOMAIN_QUERY_IGNORED => 'OUT_OF_DOMAIN_QUERY_IGNORED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SummarySkippedReason::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Summary_SummarySkippedReason::class); + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php new file mode 100644 index 000000000000..1e1426674d33 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php @@ -0,0 +1,111 @@ +google.cloud.discoveryengine.v1beta.TextInput + */ +class TextInput extends \Google\Protobuf\Internal\Message +{ + /** + * Text input. + * + * Generated from protobuf field string input = 1; + */ + protected $input = ''; + /** + * Conversation context of the input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ConversationContext context = 2; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input + * Text input. + * @type \Google\Cloud\DiscoveryEngine\V1beta\ConversationContext $context + * Conversation context of the input. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce(); + parent::__construct($data); + } + + /** + * Text input. + * + * Generated from protobuf field string input = 1; + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * Text input. + * + * Generated from protobuf field string input = 1; + * @param string $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkString($var, True); + $this->input = $var; + + return $this; + } + + /** + * Conversation context of the input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ConversationContext context = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\ConversationContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Conversation context of the input. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ConversationContext context = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\ConversationContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ConversationContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php new file mode 100644 index 000000000000..cf9532eaddbb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php @@ -0,0 +1,377 @@ +google.cloud.discoveryengine.v1beta.TransactionInfo + */ +class TransactionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $currency = ''; + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + */ + protected $transaction_id = ''; + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + */ + protected $tax = null; + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + */ + protected $cost = null; + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + */ + protected $discount_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $value + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * @type string $currency + * Required. Currency code. Use three-character ISO-4217 code. + * @type string $transaction_id + * The transaction ID with a length limit of 128 characters. + * @type float $tax + * All the taxes associated with the transaction. + * @type float $cost + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * @type float $discount_value + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getValue() + { + return isset($this->value) ? $this->value : 0.0; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. Total non-zero value associated with the transaction. This value + * may include shipping, tax, or other adjustments to the total value that you + * want to include. + * + * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkFloat($var); + $this->value = $var; + + return $this; + } + + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * Required. Currency code. Use three-character ISO-4217 code. + * + * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCurrency($var) + { + GPBUtil::checkString($var, True); + $this->currency = $var; + + return $this; + } + + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + * @return string + */ + public function getTransactionId() + { + return $this->transaction_id; + } + + /** + * The transaction ID with a length limit of 128 characters. + * + * Generated from protobuf field string transaction_id = 3; + * @param string $var + * @return $this + */ + public function setTransactionId($var) + { + GPBUtil::checkString($var, True); + $this->transaction_id = $var; + + return $this; + } + + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + * @return float + */ + public function getTax() + { + return isset($this->tax) ? $this->tax : 0.0; + } + + public function hasTax() + { + return isset($this->tax); + } + + public function clearTax() + { + unset($this->tax); + } + + /** + * All the taxes associated with the transaction. + * + * Generated from protobuf field optional float tax = 4; + * @param float $var + * @return $this + */ + public function setTax($var) + { + GPBUtil::checkFloat($var); + $this->tax = $var; + + return $this; + } + + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + * @return float + */ + public function getCost() + { + return isset($this->cost) ? $this->cost : 0.0; + } + + public function hasCost() + { + return isset($this->cost); + } + + public function clearCost() + { + unset($this->cost); + } + + /** + * All the costs associated with the products. These can be manufacturing + * costs, shipping expenses not borne by the end user, or any other costs, + * such that: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float cost = 5; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkFloat($var); + $this->cost = $var; + + return $this; + } + + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + * @return float + */ + public function getDiscountValue() + { + return isset($this->discount_value) ? $this->discount_value : 0.0; + } + + public function hasDiscountValue() + { + return isset($this->discount_value); + } + + public function clearDiscountValue() + { + unset($this->discount_value); + } + + /** + * The total discount(s) value applied to this transaction. + * This figure should be excluded from + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * For example, if a user paid + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * amount, then nominal (pre-discount) value of the transaction is the sum of + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + * and + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * This means that profit is calculated the same way, regardless of the + * discount value, and that + * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + * can be larger than + * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: + * * Profit = + * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - + * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - + * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * + * Generated from protobuf field optional float discount_value = 6; + * @param float $var + * @return $this + */ + public function setDiscountValue($var) + { + GPBUtil::checkFloat($var); + $this->discount_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php new file mode 100644 index 000000000000..db5ea34bbe3f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php @@ -0,0 +1,158 @@ +google.cloud.discoveryengine.v1beta.UpdateConversationRequest + */ +class UpdateConversationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Conversation to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation = null; + /** + * Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. + * The following are NOT supported: + * * [conversation.name][] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation Required. The Conversation to update. + * @param \Google\Protobuf\FieldMask $updateMask Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. + * The following are NOT supported: + * + * * [conversation.name][] + * + * If not set or empty, all supported fields are updated. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\UpdateConversationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setConversation($conversation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Conversation $conversation + * Required. The Conversation to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. + * The following are NOT supported: + * * [conversation.name][] + * If not set or empty, all supported fields are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Conversation to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Conversation|null + */ + public function getConversation() + { + return $this->conversation; + } + + public function hasConversation() + { + return isset($this->conversation); + } + + public function clearConversation() + { + unset($this->conversation); + } + + /** + * Required. The Conversation to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Conversation $var + * @return $this + */ + public function setConversation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Conversation::class); + $this->conversation = $var; + + return $this; + } + + /** + * Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. + * The following are NOT supported: + * * [conversation.name][] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. + * The following are NOT supported: + * * [conversation.name][] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php new file mode 100644 index 000000000000..7911356efc97 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php @@ -0,0 +1,153 @@ +google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update + * does not exist and + * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a + * new [Document][google.cloud.discoveryengine.v1beta.Document] will be + * created. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update + * does not exist and + * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * @type bool $allow_missing + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a + * new [Document][google.cloud.discoveryengine.v1beta.Document] will be + * created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update + * does not exist and + * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to update/create. + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update + * does not exist and + * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); + $this->document = $var; + + return $this; + } + + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a + * new [Document][google.cloud.discoveryengine.v1beta.Document] will be + * created. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a + * new [Document][google.cloud.discoveryengine.v1beta.Document] will be + * created. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php new file mode 100644 index 000000000000..dd16a0254cfe --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php @@ -0,0 +1,125 @@ +google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + */ +class UpdateSchemaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Operation create time. + * @type \Google\Protobuf\Timestamp $update_time + * Operation last update time. If the operation is done, this is also the + * finish time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Operation create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Operation last update time. If the operation is done, this is also the + * finish time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php new file mode 100644 index 000000000000..86c984cde2e3 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php @@ -0,0 +1,129 @@ +google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + */ +class UpdateSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = null; + /** + * If set to true, and the + * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new + * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In + * this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * update. + * @type bool $allow_missing + * If set to true, and the + * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new + * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In + * this situation, `update_mask` is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + * update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); + $this->schema = $var; + + return $this; + } + + /** + * If set to true, and the + * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new + * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In + * this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the + * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new + * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In + * this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php new file mode 100644 index 000000000000..80ed22beed6d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php @@ -0,0 +1,1186 @@ +google.cloud.discoveryengine.v1beta.UserEvent + */ +class UserEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_type = ''; + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_pseudo_id = ''; + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + */ + protected $event_time = null; + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; + */ + protected $user_info = null; + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + */ + protected $direct_user_request = false; + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + */ + protected $session_id = ''; + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; + */ + protected $page_info = null; + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. + * The value must be one of: + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. + * + * Generated from protobuf field string attribution_token = 8; + */ + protected $attribution_token = ''; + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may + * contain a filter expression in + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * conforming to https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string filter = 9; + */ + protected $filter = ''; + /** + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; + */ + private $documents; + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; + */ + protected $panel = null; + /** + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; + */ + protected $search_info = null; + /** + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; + */ + protected $completion_info = null; + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; + */ + protected $transaction_info = null; + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + */ + private $tag_ids; + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + */ + private $promotion_ids; + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * `traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + */ + private $attributes; + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; + */ + protected $media_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event_type + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @type string $user_pseudo_id + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * @type \Google\Protobuf\Timestamp $event_time + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * @type \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $user_info + * Information about the end user. + * @type bool $direct_user_request + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. + * @type string $session_id + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * as prefix. + * @type \Google\Cloud\DiscoveryEngine\V1beta\PageInfo $page_info + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * @type string $attribution_token + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. + * The value must be one of: + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. + * @type string $filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may + * contain a filter expression in + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * conforming to https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] + * is desired. + * @type \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo $panel + * Panel metadata associated with this user event. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo $search_info + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. + * This field should be set for `search` event. + * @type \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo $completion_info + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * @type \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo $transaction_info + * The transaction metadata (if any) associated with this user event. + * @type array|\Google\Protobuf\Internal\RepeatedField $tag_ids + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * `traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * @type \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo $media_info + * Media-specific info. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Required. User event type. Allowed values are: + * Generic values: + * * `search`: Search for Documents. + * * `view-item`: Detailed page view of a Document. + * * `view-item-list`: View of a panel or ordered list of Documents. + * * `view-home-page`: View of the home page. + * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + * Retail-related values: + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * Media-related values: + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkString($var, True); + $this->event_type = $var; + + return $this; + } + + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * Required. A unique identifier for tracking visitors. + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + * + * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Only required for + * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] + * method. Timestamp of when the user event happened. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\UserInfo|null + */ + public function getUserInfo() + { + return $this->user_info; + } + + public function hasUserInfo() + { + return isset($this->user_info); + } + + public function clearUserInfo() + { + unset($this->user_info); + } + + /** + * Information about the end user. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $var + * @return $this + */ + public function setUserInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserInfo::class); + $this->user_info = $var; + + return $this; + } + + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + * @return bool + */ + public function getDirectUserRequest() + { + return $this->direct_user_request; + } + + /** + * Should set to true if the request is made directly from the end user, in + * which case the + * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * can be populated from the HTTP request. + * This flag should be set only if the API request is made directly from the + * end user such as a mobile app (and not if a gateway or a server is + * processing and pushing the user events). + * This should not be set when using the JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. + * + * Generated from protobuf field bool direct_user_request = 5; + * @param bool $var + * @return $this + */ + public function setDirectUserRequest($var) + { + GPBUtil::checkBool($var); + $this->direct_user_request = $var; + + return $this; + } + + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + * @return string + */ + public function getSessionId() + { + return $this->session_id; + } + + /** + * A unique identifier for tracking a visitor session with a length limit of + * 128 bytes. A session is an aggregation of an end user behavior in a time + * span. + * A general guideline to populate the session_id: + * 1. If user has no activity for 30 min, a new session_id should be assigned. + * 2. The session_id should be unique across users, suggest use uuid or add + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + * as prefix. + * + * Generated from protobuf field string session_id = 6; + * @param string $var + * @return $this + */ + public function setSessionId($var) + { + GPBUtil::checkString($var, True); + $this->session_id = $var; + + return $this; + } + + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; + * @return \Google\Cloud\DiscoveryEngine\V1beta\PageInfo|null + */ + public function getPageInfo() + { + return $this->page_info; + } + + public function hasPageInfo() + { + return isset($this->page_info); + } + + public function clearPageInfo() + { + unset($this->page_info); + } + + /** + * Page metadata such as categories and other critical information for certain + * event types such as `view-category-page`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; + * @param \Google\Cloud\DiscoveryEngine\V1beta\PageInfo $var + * @return $this + */ + public function setPageInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\PageInfo::class); + $this->page_info = $var; + + return $this; + } + + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. + * The value must be one of: + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. + * + * Generated from protobuf field string attribution_token = 8; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * Token to attribute an API response to user action(s) to trigger the event. + * Highly recommended for user events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. + * The value must be one of: + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. + * This token enables us to accurately attribute page view or conversion + * completion back to the event and the particular predict response containing + * this clicked/purchased product. If user clicks on product K in the + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. + * + * Generated from protobuf field string attribution_token = 8; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may + * contain a filter expression in + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * conforming to https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string filter = 9; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. + * One example is for `search` events, the associated + * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may + * contain a filter expression in + * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + * conforming to https://google.aip.dev/160#filtering. + * Similarly, for `view-item-list` events that are generated from a + * [RecommendationService.RecommendRequest][], this field may be populated + * directly from [RecommendationService.RecommendRequest.filter][] conforming + * to https://google.aip.dev/160#filtering. + * The value must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string filter = 9; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. + * This field is optional except for the following event types: + * * `view-item` + * * `add-to-cart` + * * `purchase` + * * `media-play` + * * `media-complete` + * In a `search` event, this field represents the documents returned to the + * end user on the current page (the end user may have not finished browsing + * the whole page yet). When a new page is returned to the end user, after + * pagination/filtering/ordering even for the same query, a new `search` event + * with different + * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] + * is desired. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo::class); + $this->documents = $arr; + + return $this; + } + + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; + * @return \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo|null + */ + public function getPanel() + { + return $this->panel; + } + + public function hasPanel() + { + return isset($this->panel); + } + + public function clearPanel() + { + unset($this->panel); + } + + /** + * Panel metadata associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; + * @param \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo $var + * @return $this + */ + public function setPanel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo::class); + $this->panel = $var; + + return $this; + } + + /** + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo|null + */ + public function getSearchInfo() + { + return $this->search_info; + } + + public function hasSearchInfo() + { + return isset($this->search_info); + } + + public function clearSearchInfo() + { + unset($this->search_info); + } + + /** + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. + * This field should be set for `search` event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo $var + * @return $this + */ + public function setSearchInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo::class); + $this->search_info = $var; + + return $this; + } + + /** + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; + * @return \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo|null + */ + public function getCompletionInfo() + { + return $this->completion_info; + } + + public function hasCompletionInfo() + { + return isset($this->completion_info); + } + + public function clearCompletionInfo() + { + unset($this->completion_info); + } + + /** + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. + * This field should be set for `search` event when autocomplete function is + * enabled and the user clicks a suggestion for search. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; + * @param \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo $var + * @return $this + */ + public function setCompletionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo::class); + $this->completion_info = $var; + + return $this; + } + + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; + * @return \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo|null + */ + public function getTransactionInfo() + { + return $this->transaction_info; + } + + public function hasTransactionInfo() + { + return isset($this->transaction_info); + } + + public function clearTransactionInfo() + { + unset($this->transaction_info); + } + + /** + * The transaction metadata (if any) associated with this user event. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; + * @param \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo $var + * @return $this + */ + public function setTransactionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo::class); + $this->transaction_info = $var; + + return $this; + } + + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTagIds() + { + return $this->tag_ids; + } + + /** + * A list of identifiers for the independent experiment groups this user event + * belongs to. This is used to distinguish between user events associated with + * different experiment setups on the customer end. + * + * Generated from protobuf field repeated string tag_ids = 15; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTagIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tag_ids = $arr; + + return $this; + } + + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPromotionIds() + { + return $this->promotion_ids; + } + + /** + * The promotion IDs if this is an event associated with promotions. + * Currently, this field is restricted to at most one ID. + * + * Generated from protobuf field repeated string promotion_ids = 16; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPromotionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->promotion_ids = $arr; + + return $this; + } + + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * `traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Extra user event features to include in the recommendation model. + * These attributes must NOT contain data that needs to be parsed or processed + * further, e.g. JSON or other encodings. + * If you provide custom attributes for ingested user events, also include + * them in the user events that you associate with prediction requests. Custom + * attribute formatting must be consistent between imported events and events + * provided with prediction requests. This lets the Discovery Engine API use + * those custom attributes when training models and serving predictions, which + * helps improve recommendation quality. + * This field needs to pass all below criteria, otherwise an + * `INVALID_ARGUMENT` error is returned: + * * The key must be a UTF-8 encoded string with a length limit of 5,000 + * characters. + * * For text attributes, at most 400 values are allowed. Empty values are not + * allowed. Each value must be a UTF-8 encoded string with a length limit of + * 256 characters. + * * For number attributes, at most 400 values are allowed. + * For product recommendations, an example of extra user information is + * `traffic_channel`, which is how a user arrives at the site. Users can + * arrive + * at the site by coming to the site directly, coming through Google + * search, or in other ways. + * + * Generated from protobuf field map attributes = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\CustomAttribute::class); + $this->attributes = $arr; + + return $this; + } + + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; + * @return \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo|null + */ + public function getMediaInfo() + { + return $this->media_info; + } + + public function hasMediaInfo() + { + return isset($this->media_info); + } + + public function clearMediaInfo() + { + unset($this->media_info); + } + + /** + * Media-specific info. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; + * @param \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo $var + * @return $this + */ + public function setMediaInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo::class); + $this->media_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php new file mode 100644 index 000000000000..5684be976bb2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php @@ -0,0 +1,161 @@ +google.cloud.discoveryengine.v1beta.UserInfo + */ +class UserInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + */ + protected $user_id = ''; + /** + * User agent as included in the HTTP header. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + */ + protected $user_agent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user_id + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type string $user_agent + * User agent as included in the HTTP header. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + * is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); + parent::__construct($data); + } + + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + * @return string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Highly recommended for logged-in users. Unique identifier for logged-in + * user, such as a user name. Don't set for anonymous users. + * Always use a hashed value for this ID. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded + * model quality. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_id = 1; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->user_id = $var; + + return $this; + } + + /** + * User agent as included in the HTTP header. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * User agent as included in the HTTP header. + * The field must be a UTF-8 encoded string with a length limit of 1,000 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * This should not be set when using the client side event reporting with + * GTM or JavaScript tag in + * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] + * or if + * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + * is set. + * + * Generated from protobuf field string user_agent = 2; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php new file mode 100644 index 000000000000..0160c406ea4a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php @@ -0,0 +1,115 @@ +google.cloud.discoveryengine.v1beta.WriteUserEventRequest + */ +class WriteUserEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @type \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $user_event + * Required. User event to write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEventService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent DataStore resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\UserEvent|null + */ + public function getUserEvent() + { + return $this->user_event; + } + + public function hasUserEvent() + { + return isset($this->user_event); + } + + public function clearUserEvent() + { + unset($this->user_event); + } + + /** + * Required. User event to write. + * + * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); + $this->user_event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php new file mode 100644 index 000000000000..9c189002c471 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php @@ -0,0 +1,81 @@ +setDataStore($formattedDataStore) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var CompleteQueryResponse $response */ + $response = $completionServiceClient->completeQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedDataStore = CompletionServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + $query = '[QUERY]'; + + complete_query_sample($formattedDataStore, $query); +} +// [END discoveryengine_v1beta_generated_CompletionService_CompleteQuery_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php new file mode 100644 index 000000000000..7599eca43ce4 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php @@ -0,0 +1,84 @@ +setName($formattedName) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var ConverseConversationResponse $response */ + $response = $conversationalSearchServiceClient->converseConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversationalSearchServiceClient::conversationName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[CONVERSATION]' + ); + + converse_conversation_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_ConverseConversation_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php new file mode 100644 index 000000000000..c4008f59683c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setConversation($conversation); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationalSearchServiceClient->createConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversationalSearchServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + + create_conversation_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateConversation_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php new file mode 100644 index 000000000000..e87459e3e344 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $conversationalSearchServiceClient->deleteConversation($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversationalSearchServiceClient::conversationName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[CONVERSATION]' + ); + + delete_conversation_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_DeleteConversation_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php new file mode 100644 index 000000000000..2db28964741d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationalSearchServiceClient->getConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversationalSearchServiceClient::conversationName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[CONVERSATION]' + ); + + get_conversation_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_GetConversation_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php new file mode 100644 index 000000000000..375ffc916de1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationalSearchServiceClient->listConversations($request); + + /** @var Conversation $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversationalSearchServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + + list_conversations_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_ListConversations_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php new file mode 100644 index 000000000000..80767a71fbc6 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php @@ -0,0 +1,64 @@ +setConversation($conversation); + + // Call the API and handle any network failures. + try { + /** @var Conversation $response */ + $response = $conversationalSearchServiceClient->updateConversation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_UpdateConversation_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php new file mode 100644 index 000000000000..a8e46998d290 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->createDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + $documentId = '[DOCUMENT_ID]'; + + create_document_sample($formattedParent, $documentId); +} +// [END discoveryengine_v1beta_generated_DocumentService_CreateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php new file mode 100644 index 000000000000..7e1f97e9fd13 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $documentServiceClient->deleteDocument($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentServiceClient::documentName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]', + '[DOCUMENT]' + ); + + delete_document_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_DocumentService_DeleteDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php new file mode 100644 index 000000000000..f0244698e8d9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->getDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentServiceClient::documentName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]', + '[DOCUMENT]' + ); + + get_document_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_DocumentService_GetDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php new file mode 100644 index 000000000000..a7878c9ca678 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php @@ -0,0 +1,96 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentServiceClient->importDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + + import_documents_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_DocumentService_ImportDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php new file mode 100644 index 000000000000..e988fa91ef9b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php @@ -0,0 +1,89 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentServiceClient->listDocuments($request); + + /** @var Document $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + + list_documents_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_DocumentService_ListDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php new file mode 100644 index 000000000000..106df6d1c0ec --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php @@ -0,0 +1,110 @@ +setParent($formattedParent) + ->setFilter($filter); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentServiceClient->purgeDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PurgeDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentServiceClient::branchName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[BRANCH]' + ); + $filter = '[FILTER]'; + + purge_documents_sample($formattedParent, $filter); +} +// [END discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php new file mode 100644 index 000000000000..9ff84c5aa563 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php @@ -0,0 +1,59 @@ +setDocument($document); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $documentServiceClient->updateDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1beta_generated_DocumentService_UpdateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php new file mode 100644 index 000000000000..e22490379b2f --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php @@ -0,0 +1,126 @@ + Men > Jeans + * + * Retail-related values: + * + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * + * Media-related values: + * + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @param string $userEventUserPseudoId A unique identifier for tracking visitors. + * + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + */ +function recommend_sample( + string $formattedServingConfig, + string $userEventEventType, + string $userEventUserPseudoId +): void { + // Create a client. + $recommendationServiceClient = new RecommendationServiceClient(); + + // Prepare the request message. + $userEvent = (new UserEvent()) + ->setEventType($userEventEventType) + ->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest()) + ->setServingConfig($formattedServingConfig) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var RecommendResponse $response */ + $response = $recommendationServiceClient->recommend($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedServingConfig = RecommendationServiceClient::servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $userEventEventType = '[EVENT_TYPE]'; + $userEventUserPseudoId = '[USER_PSEUDO_ID]'; + + recommend_sample($formattedServingConfig, $userEventEventType, $userEventUserPseudoId); +} +// [END discoveryengine_v1beta_generated_RecommendationService_Recommend_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php new file mode 100644 index 000000000000..8b59f61f95ab --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->createSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schema $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schemaId = '[SCHEMA_ID]'; + + create_schema_sample($formattedParent, $schemaId); +} +// [END discoveryengine_v1beta_generated_SchemaService_CreateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php new file mode 100644 index 000000000000..88465c02b0c4 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->deleteSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SchemaServiceClient::schemaName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SCHEMA]' + ); + + delete_schema_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_SchemaService_DeleteSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php new file mode 100644 index 000000000000..fe9bad536488 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Schema $response */ + $response = $schemaServiceClient->getSchema($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SchemaServiceClient::schemaName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SCHEMA]' + ); + + get_schema_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_SchemaService_GetSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php new file mode 100644 index 000000000000..6cc72cd99c30 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $schemaServiceClient->listSchemas($request); + + /** @var Schema $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + + list_schemas_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_SchemaService_ListSchemas_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php new file mode 100644 index 000000000000..4634c84a3008 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php @@ -0,0 +1,71 @@ +setSchema($schema); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $schemaServiceClient->updateSchema($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schema $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1beta_generated_SchemaService_UpdateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php new file mode 100644 index 000000000000..eccb5311c97c --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php @@ -0,0 +1,84 @@ +setServingConfig($formattedServingConfig); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $searchServiceClient->search($request); + + /** @var SearchResult $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedServingConfig = SearchServiceClient::servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + + search_sample($formattedServingConfig); +} +// [END discoveryengine_v1beta_generated_SearchService_Search_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php new file mode 100644 index 000000000000..84f50ea1967d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var HttpBody $response */ + $response = $userEventServiceClient->collectUserEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = '[USER_EVENT]'; + + collect_user_event_sample($formattedParent, $userEvent); +} +// [END discoveryengine_v1beta_generated_UserEventService_CollectUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php new file mode 100644 index 000000000000..e038496755cd --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php @@ -0,0 +1,90 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $userEventServiceClient->importUserEvents($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportUserEventsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + + import_user_events_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php new file mode 100644 index 000000000000..eaf89dfa96f2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php @@ -0,0 +1,117 @@ + Men > Jeans + * + * Retail-related values: + * + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * + * Media-related values: + * + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @param string $userEventUserPseudoId A unique identifier for tracking visitors. + * + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + */ +function write_user_event_sample( + string $formattedParent, + string $userEventEventType, + string $userEventUserPseudoId +): void { + // Create a client. + $userEventServiceClient = new UserEventServiceClient(); + + // Prepare the request message. + $userEvent = (new UserEvent()) + ->setEventType($userEventEventType) + ->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var UserEvent $response */ + $response = $userEventServiceClient->writeUserEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEventEventType = '[EVENT_TYPE]'; + $userEventUserPseudoId = '[USER_PSEUDO_ID]'; + + write_user_event_sample($formattedParent, $userEventEventType, $userEventUserPseudoId); +} +// [END discoveryengine_v1beta_generated_UserEventService_WriteUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php new file mode 100644 index 000000000000..48186a09aeab --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php @@ -0,0 +1,294 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/completion_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/completion_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/completion_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/completion_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + * + * @experimental + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + * + * @experimental + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Completes the specified user input with keyword suggestions. + * + * The async variant is {@see self::completeQueryAsync()} . + * + * @example samples/V1beta/CompletionServiceClient/complete_query.php + * + * @param CompleteQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompleteQueryResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse + { + return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php new file mode 100644 index 000000000000..75c1448a2225 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php @@ -0,0 +1,604 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/conversational_search_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/conversational_search_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/conversational_search_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/conversational_search_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a conversation + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $conversation + * + * @return string The formatted conversation resource. + * + * @experimental + */ + public static function conversationName(string $project, string $location, string $dataStore, string $conversation): string + { + return self::getPathTemplate('conversation')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + * + * @experimental + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_conversation resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $conversation + * + * @return string The formatted project_location_collection_data_store_conversation resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreConversationName(string $project, string $location, string $collection, string $dataStore, string $conversation): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreConversation')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_collection_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + * + * @experimental + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_conversation resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $conversation + * + * @return string The formatted project_location_data_store_conversation resource. + * + * @experimental + */ + public static function projectLocationDataStoreConversationName(string $project, string $location, string $dataStore, string $conversation): string + { + return self::getPathTemplate('projectLocationDataStoreConversation')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'conversation' => $conversation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted serving_config resource. + * + * @experimental + */ + public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('servingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conversation: projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation} + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreConversation: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation} + * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreConversation: projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation} + * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Converses a conversation. + * + * The async variant is {@see self::converseConversationAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php + * + * @param ConverseConversationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConverseConversationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function converseConversation(ConverseConversationRequest $request, array $callOptions = []): ConverseConversationResponse + { + return $this->startApiCall('ConverseConversation', $request, $callOptions)->wait(); + } + + /** + * Creates a Conversation. + * + * If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to + * create already exists, an ALREADY_EXISTS error is returned. + * + * The async variant is {@see self::createConversationAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/create_conversation.php + * + * @param CreateConversationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Conversation + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createConversation(CreateConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('CreateConversation', $request, $callOptions)->wait(); + } + + /** + * Deletes a Conversation. + * + * If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to + * delete does not exist, a NOT_FOUND error is returned. + * + * The async variant is {@see self::deleteConversationAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php + * + * @param DeleteConversationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteConversation(DeleteConversationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteConversation', $request, $callOptions)->wait(); + } + + /** + * Gets a Conversation. + * + * The async variant is {@see self::getConversationAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/get_conversation.php + * + * @param GetConversationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Conversation + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getConversation(GetConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('GetConversation', $request, $callOptions)->wait(); + } + + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + * + * The async variant is {@see self::listConversationsAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/list_conversations.php + * + * @param ListConversationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listConversations(ListConversationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConversations', $request, $callOptions); + } + + /** + * Updates a Conversation. + * + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] action + * type cannot be changed. If the + * [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update + * does not exist, a NOT_FOUND error is returned. + * + * The async variant is {@see self::updateConversationAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/update_conversation.php + * + * @param UpdateConversationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Conversation + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateConversation(UpdateConversationRequest $request, array $callOptions = []): Conversation + { + return $this->startApiCall('UpdateConversation', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php new file mode 100644 index 000000000000..681ae376df2d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php @@ -0,0 +1,622 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/document_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/document_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/document_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/document_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + * + * @experimental + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a branch + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted branch resource. + * + * @experimental + */ + public static function branchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('branch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + * + * @experimental + */ + public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_collection_data_store_branch resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_data_store_branch resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * The async variant is {@see self::createDocumentAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/create_document.php + * + * @param CreateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); + } + + /** + * Deletes a [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * The async variant is {@see self::deleteDocumentAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/delete_document.php + * + * @param DeleteDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); + } + + /** + * Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * The async variant is {@see self::getDocumentAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/get_document.php + * + * @param GetDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); + } + + /** + * Bulk import of multiple + * [Document][google.cloud.discoveryengine.v1beta.Document]s. Request + * processing may be synchronous. Non-existing items will be created. + * + * Note: It is possible for a subset of the + * [Document][google.cloud.discoveryengine.v1beta.Document]s to be + * successfully updated. + * + * The async variant is {@see self::importDocumentsAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/import_documents.php + * + * @param ImportDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); + } + + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s. + * + * The async variant is {@see self::listDocumentsAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/list_documents.php + * + * @param ListDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDocuments', $request, $callOptions); + } + + /** + * Permanently deletes all selected + * [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch. + * + * This process is asynchronous. Depending on the number of + * [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, + * this operation can take hours to complete. Before the delete operation + * completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s + * might still be returned by + * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + * or + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + * + * To get a list of the + * [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, + * set + * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + * to false. + * + * The async variant is {@see self::purgeDocumentsAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/purge_documents.php + * + * @param PurgeDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function purgeDocuments(PurgeDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PurgeDocuments', $request, $callOptions)->wait(); + } + + /** + * Updates a [Document][google.cloud.discoveryengine.v1beta.Document]. + * + * The async variant is {@see self::updateDocumentAsync()} . + * + * @example samples/V1beta/DocumentServiceClient/update_document.php + * + * @param UpdateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php new file mode 100644 index 000000000000..067af4b533f8 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php @@ -0,0 +1,380 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/recommendation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/recommendation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/recommendation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/recommendation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + * + * @experimental + */ + public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_collection_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted serving_config resource. + * + * @experimental + */ + public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('servingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Makes a recommendation, which requires a contextual user event. + * + * The async variant is {@see self::recommendAsync()} . + * + * @example samples/V1beta/RecommendationServiceClient/recommend.php + * + * @param RecommendRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RecommendResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function recommend(RecommendRequest $request, array $callOptions = []): RecommendResponse + { + return $this->startApiCall('Recommend', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php new file mode 100644 index 000000000000..9936cab52f81 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php @@ -0,0 +1,528 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/schema_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/schema_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/schema_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/schema_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + * + * @experimental + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + * + * @experimental + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_collection_data_store_schema resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreSchemaName(string $project, string $location, string $collection, string $dataStore, string $schema): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + * + * @experimental + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_data_store_schema resource. + * + * @experimental + */ + public static function projectLocationDataStoreSchemaName(string $project, string $location, string $dataStore, string $schema): string + { + return self::getPathTemplate('projectLocationDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a schema + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted schema resource. + * + * @experimental + */ + public static function schemaName(string $project, string $location, string $dataStore, string $schema): string + { + return self::getPathTemplate('schema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreSchema: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreSchema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} + * - schema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + * + * The async variant is {@see self::createSchemaAsync()} . + * + * @example samples/V1beta/SchemaServiceClient/create_schema.php + * + * @param CreateSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createSchema(CreateSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSchema', $request, $callOptions)->wait(); + } + + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + * + * The async variant is {@see self::deleteSchemaAsync()} . + * + * @example samples/V1beta/SchemaServiceClient/delete_schema.php + * + * @param DeleteSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteSchema(DeleteSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSchema', $request, $callOptions)->wait(); + } + + /** + * Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + * + * The async variant is {@see self::getSchemaAsync()} . + * + * @example samples/V1beta/SchemaServiceClient/get_schema.php + * + * @param GetSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Schema + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getSchema(GetSchemaRequest $request, array $callOptions = []): Schema + { + return $this->startApiCall('GetSchema', $request, $callOptions)->wait(); + } + + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + * + * The async variant is {@see self::listSchemasAsync()} . + * + * @example samples/V1beta/SchemaServiceClient/list_schemas.php + * + * @param ListSchemasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listSchemas(ListSchemasRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSchemas', $request, $callOptions); + } + + /** + * Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + * + * The async variant is {@see self::updateSchemaAsync()} . + * + * @example samples/V1beta/SchemaServiceClient/update_schema.php + * + * @param UpdateSchemaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateSchema(UpdateSchemaRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSchema', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php new file mode 100644 index 000000000000..6efc66cc3d3d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php @@ -0,0 +1,374 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/search_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/search_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/search_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/search_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a branch + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted branch resource. + * + * @experimental + */ + public static function branchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('branch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_collection_data_store_branch resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_collection_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * + * @return string The formatted project_location_data_store_branch resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string + { + return self::getPathTemplate('projectLocationDataStoreBranch')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_data_store_serving_config resource. + * + * @experimental + */ + public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted serving_config resource. + * + * @experimental + */ + public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string + { + return self::getPathTemplate('servingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} + * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Performs a search. + * + * The async variant is {@see self::searchAsync()} . + * + * @example samples/V1beta/SearchServiceClient/search.php + * + * @param SearchRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function search(SearchRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('Search', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php new file mode 100644 index 000000000000..2ffbe7f091a9 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php @@ -0,0 +1,484 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/user_event_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/user_event_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/user_event_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/user_event_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + * + * @experimental + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + * + * @experimental + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + * + * @experimental + */ + public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + * + * @experimental + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string + { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Writes a single user event from the browser. This uses a GET request to + * due to browser restriction of POST-ing to a third-party domain. + * + * This method is used only by the Discovery Engine API JavaScript pixel and + * Google Tag Manager. Users should not call this method directly. + * + * The async variant is {@see self::collectUserEventAsync()} . + * + * @example samples/V1beta/UserEventServiceClient/collect_user_event.php + * + * @param CollectUserEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HttpBody + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function collectUserEvent(CollectUserEventRequest $request, array $callOptions = []): HttpBody + { + return $this->startApiCall('CollectUserEvent', $request, $callOptions)->wait(); + } + + /** + * Bulk import of User events. Request processing might be + * synchronous. Events that already exist are skipped. + * Use this method for backfilling historical user events. + * + * Operation.response is of type ImportResponse. Note that it is + * possible for a subset of the items to be successfully inserted. + * Operation.metadata is of type ImportMetadata. + * + * The async variant is {@see self::importUserEventsAsync()} . + * + * @example samples/V1beta/UserEventServiceClient/import_user_events.php + * + * @param ImportUserEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function importUserEvents(ImportUserEventsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportUserEvents', $request, $callOptions)->wait(); + } + + /** + * Writes a single user event. + * + * The async variant is {@see self::writeUserEventAsync()} . + * + * @example samples/V1beta/UserEventServiceClient/write_user_event.php + * + * @param WriteUserEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserEvent + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function writeUserEvent(WriteUserEventRequest $request, array $callOptions = []): UserEvent + { + return $this->startApiCall('WriteUserEvent', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php new file mode 100644 index 000000000000..6855fab218e3 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php @@ -0,0 +1,42 @@ + [ + 'google.cloud.discoveryengine.v1beta.CompletionService' => [ + 'CompleteQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'data_store', + 'fieldAccessors' => [ + 'getDataStore', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php new file mode 100644 index 000000000000..ea503f4eecb8 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php @@ -0,0 +1,150 @@ + [ + 'google.cloud.discoveryengine.v1beta.CompletionService' => [ + 'CompleteQuery' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery', + ], + ], + 'placeholders' => [ + 'data_store' => [ + 'getters' => [ + 'getDataStore', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json new file mode 100644 index 000000000000..d445301cc989 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.ConversationalSearchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "ConverseConversation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateConversation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteConversation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetConversation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListConversations": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateConversation": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php new file mode 100644 index 000000000000..36ba10b22de8 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php @@ -0,0 +1,100 @@ + [ + 'google.cloud.discoveryengine.v1beta.ConversationalSearchService' => [ + 'ConverseConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConversations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListConversationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateConversation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Conversation', + 'headerParams' => [ + [ + 'keyName' => 'conversation.name', + 'fieldAccessors' => [ + 'getConversation', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'conversation' => 'projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}', + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreConversation' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}', + 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreConversation' => 'projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}', + 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php new file mode 100644 index 000000000000..04a75f7f8f32 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php @@ -0,0 +1,242 @@ + [ + 'google.cloud.discoveryengine.v1beta.ConversationalSearchService' => [ + 'ConverseConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateConversation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations', + 'body' => 'conversation', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations', + 'body' => 'conversation', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateConversation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}', + 'body' => 'conversation', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}', + 'body' => 'conversation', + ], + ], + 'placeholders' => [ + 'conversation.name' => [ + 'getters' => [ + 'getConversation', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json new file mode 100644 index 000000000000..f31c7d6b35f0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json @@ -0,0 +1,81 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.DocumentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CreateDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ImportDocuments": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListDocuments": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "PurgeDocuments": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateDocument": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php new file mode 100644 index 000000000000..743e3dc11bb5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php @@ -0,0 +1,123 @@ + [ + 'google.cloud.discoveryengine.v1beta.DocumentService' => [ + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\PurgeDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\PurgeDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', + 'headerParams' => [ + [ + 'keyName' => 'document.name', + 'fieldAccessors' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php new file mode 100644 index 000000000000..8427f0f2e1e1 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php @@ -0,0 +1,267 @@ + [ + 'google.cloud.discoveryengine.v1beta.DocumentService' => [ + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', + 'body' => 'document', + 'queryParams' => [ + 'document_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'document_id', + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', + 'body' => 'document', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', + 'body' => 'document', + ], + ], + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json new file mode 100644 index 000000000000..2e290adf1745 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.RecommendationService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 5000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000, + "total_timeout_millis": 5000 + } + }, + "methods": { + "Recommend": { + "timeout_millis": 5000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php new file mode 100644 index 000000000000..5dc3021feb5d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.discoveryengine.v1beta.RecommendationService' => [ + 'Recommend' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse', + 'headerParams' => [ + [ + 'keyName' => 'serving_config', + 'fieldAccessors' => [ + 'getServingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php new file mode 100644 index 000000000000..b7d7dfd1bf0d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php @@ -0,0 +1,152 @@ + [ + 'google.cloud.discoveryengine.v1beta.RecommendationService' => [ + 'Recommend' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'serving_config' => [ + 'getters' => [ + 'getServingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json new file mode 100644 index 000000000000..a125a00926a2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.SchemaService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListSchemas": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php new file mode 100644 index 000000000000..190825f414a2 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php @@ -0,0 +1,106 @@ + [ + 'google.cloud.discoveryengine.v1beta.SchemaService' => [ + 'CreateSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\Schema', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\CreateSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\DeleteSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSchema' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\Schema', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\UpdateSchemaMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'schema.name', + 'fieldAccessors' => [ + 'getSchema', + 'getName', + ], + ], + ], + ], + 'GetSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Schema', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSchemas' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSchemas', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListSchemasResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreSchema' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreSchema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', + 'schema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php new file mode 100644 index 000000000000..edb36e463bc5 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php @@ -0,0 +1,229 @@ + [ + 'google.cloud.discoveryengine.v1beta.SchemaService' => [ + 'CreateSchema' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas', + 'body' => 'schema', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', + 'body' => 'schema', + 'queryParams' => [ + 'schema_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'schema_id', + ], + ], + 'DeleteSchema' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSchema' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSchemas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSchema' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}', + 'body' => 'schema', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', + 'body' => 'schema', + ], + ], + 'placeholders' => [ + 'schema.name' => [ + 'getters' => [ + 'getSchema', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json new file mode 100644 index 000000000000..f98ea3de4901 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.SearchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 5000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000, + "total_timeout_millis": 5000 + } + }, + "methods": { + "Search": { + "timeout_millis": 5000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php new file mode 100644 index 000000000000..a75a6ceae41e --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.discoveryengine.v1beta.SearchService' => [ + 'Search' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\SearchResponse', + 'headerParams' => [ + [ + 'keyName' => 'serving_config', + 'fieldAccessors' => [ + 'getServingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', + 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php new file mode 100644 index 000000000000..70b3ee95a49a --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php @@ -0,0 +1,152 @@ + [ + 'google.cloud.discoveryengine.v1beta.SearchService' => [ + 'Search' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'serving_config' => [ + 'getters' => [ + 'getServingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json new file mode 100644 index 000000000000..5fe27d73fa58 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json @@ -0,0 +1,61 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.UserEventService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CollectUserEvent": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ImportUserEvents": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "WriteUserEvent": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php new file mode 100644 index 000000000000..2cb4429f2d60 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php @@ -0,0 +1,59 @@ + [ + 'google.cloud.discoveryengine.v1beta.UserEventService' => [ + 'ImportUserEvents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CollectUserEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Api\HttpBody', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'WriteUserEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\UserEvent', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php new file mode 100644 index 000000000000..e204c5c30a2b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php @@ -0,0 +1,188 @@ + [ + 'google.cloud.discoveryengine.v1beta.UserEventService' => [ + 'CollectUserEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportUserEvents' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'WriteUserEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write', + 'body' => 'user_event', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write', + 'body' => 'user_event', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php new file mode 100644 index 000000000000..9580255c41b0 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php @@ -0,0 +1,165 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CompletionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CompletionServiceClient($options); + } + + /** @test */ + public function completeQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $tailMatchTriggered = true; + $expectedResponse = new CompleteQueryResponse(); + $expectedResponse->setTailMatchTriggered($tailMatchTriggered); + $transport->addResponse($expectedResponse); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + $response = $gapicClient->completeQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.CompletionService/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getDataStore(); + $this->assertProtobufEquals($formattedDataStore, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + try { + $gapicClient->completeQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $tailMatchTriggered = true; + $expectedResponse = new CompleteQueryResponse(); + $expectedResponse->setTailMatchTriggered($tailMatchTriggered); + $transport->addResponse($expectedResponse); + // Mock request + $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $query = 'query107944136'; + $request = (new CompleteQueryRequest()) + ->setDataStore($formattedDataStore) + ->setQuery($query); + $response = $gapicClient->completeQueryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.CompletionService/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getDataStore(); + $this->assertProtobufEquals($formattedDataStore, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php new file mode 100644 index 000000000000..92bc3d28034d --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php @@ -0,0 +1,507 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConversationalSearchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversationalSearchServiceClient($options); + } + + /** @test */ + public function converseConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ConverseConversationResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $query = new TextInput(); + $request = (new ConverseConversationRequest()) + ->setName($formattedName) + ->setQuery($query); + $response = $gapicClient->converseConversation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/ConverseConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function converseConversationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $query = new TextInput(); + $request = (new ConverseConversationRequest()) + ->setName($formattedName) + ->setQuery($query); + try { + $gapicClient->converseConversation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setUserPseudoId($userPseudoId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $conversation = new Conversation(); + $request = (new CreateConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + $response = $gapicClient->createConversation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/CreateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $conversation = new Conversation(); + $request = (new CreateConversationRequest()) + ->setParent($formattedParent) + ->setConversation($conversation); + try { + $gapicClient->createConversation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $request = (new DeleteConversationRequest()) + ->setName($formattedName); + $gapicClient->deleteConversation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/DeleteConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $request = (new DeleteConversationRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteConversation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name2); + $expectedResponse->setUserPseudoId($userPseudoId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $request = (new GetConversationRequest()) + ->setName($formattedName); + $response = $gapicClient->getConversation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/GetConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $request = (new GetConversationRequest()) + ->setName($formattedName); + try { + $gapicClient->getConversation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversationsElement = new Conversation(); + $conversations = [ + $conversationsElement, + ]; + $expectedResponse = new ListConversationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversations($conversations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListConversationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConversations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/ListConversations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListConversationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConversations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Conversation(); + $expectedResponse->setName($name); + $expectedResponse->setUserPseudoId($userPseudoId); + $transport->addResponse($expectedResponse); + // Mock request + $conversation = new Conversation(); + $request = (new UpdateConversationRequest()) + ->setConversation($conversation); + $response = $gapicClient->updateConversation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/UpdateConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getConversation(); + $this->assertProtobufEquals($conversation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $conversation = new Conversation(); + $request = (new UpdateConversationRequest()) + ->setConversation($conversation); + try { + $gapicClient->updateConversation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function converseConversationAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ConverseConversationResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); + $query = new TextInput(); + $request = (new ConverseConversationRequest()) + ->setName($formattedName) + ->setQuery($query); + $response = $gapicClient->converseConversationAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.ConversationalSearchService/ConverseConversation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php new file mode 100644 index 000000000000..7ca4b1e05398 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php @@ -0,0 +1,732 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DocumentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DocumentServiceClient($options); + } + + /** @test */ + public function createDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + $response = $gapicClient->createDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + try { + $gapicClient->createDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new DeleteDocumentRequest()) + ->setName($formattedName); + $gapicClient->deleteDocument($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/DeleteDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new DeleteDocumentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new GetDocumentRequest()) + ->setName($formattedName); + $response = $gapicClient->getDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); + $request = (new GetDocumentRequest()) + ->setName($formattedName); + try { + $gapicClient->getDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ImportDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ImportDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $documentsElement = new Document(); + $documents = [ + $documentsElement, + ]; + $expectedResponse = new ListDocumentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDocuments($documents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ListDocumentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDocuments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $request = (new ListDocumentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDocuments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $purgeCount = 575305851; + $expectedResponse = new PurgeDocumentsResponse(); + $expectedResponse->setPurgeCount($purgeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $filter = 'filter-1274492040'; + $request = (new PurgeDocumentsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->purgeDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/PurgeDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function purgeDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $filter = 'filter-1274492040'; + $request = (new PurgeDocumentsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->purgeDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document); + $response = $gapicClient->updateDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/UpdateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document); + try { + $gapicClient->updateDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonData = 'jsonData-1083208543'; + $name = 'name3373707'; + $id = 'id3355'; + $schemaId = 'schemaId-153006983'; + $parentDocumentId = 'parentDocumentId-1870594390'; + $expectedResponse = new Document(); + $expectedResponse->setJsonData($jsonData); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setSchemaId($schemaId); + $expectedResponse->setParentDocumentId($parentDocumentId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); + $document = new Document(); + $documentId = 'documentId506676927'; + $request = (new CreateDocumentRequest()) + ->setParent($formattedParent) + ->setDocument($document) + ->setDocumentId($documentId); + $response = $gapicClient->createDocumentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php new file mode 100644 index 000000000000..b4878ec743cb --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php @@ -0,0 +1,182 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecommendationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecommendationServiceClient($options); + } + + /** @test */ + public function recommendTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $attributionToken = 'attributionToken-729411015'; + $validateOnly2 = true; + $expectedResponse = new RecommendResponse(); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setValidateOnly($validateOnly2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest()) + ->setServingConfig($formattedServingConfig) + ->setUserEvent($userEvent); + $response = $gapicClient->recommend($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.RecommendationService/Recommend', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function recommendExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest()) + ->setServingConfig($formattedServingConfig) + ->setUserEvent($userEvent); + try { + $gapicClient->recommend($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function recommendAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $attributionToken = 'attributionToken-729411015'; + $validateOnly2 = true; + $expectedResponse = new RecommendResponse(); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setValidateOnly($validateOnly2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest()) + ->setServingConfig($formattedServingConfig) + ->setUserEvent($userEvent); + $response = $gapicClient->recommendAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.RecommendationService/Recommend', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php new file mode 100644 index 000000000000..47c87263a568 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php @@ -0,0 +1,669 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SchemaServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SchemaServiceClient($options); + } + + /** @test */ + public function createSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/CreateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $actualValue = $actualApiRequestObject->getSchemaId(); + $this->assertProtobufEquals($schemaId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new DeleteSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/DeleteSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new DeleteSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $jsonSchema = 'jsonSchema-1150390056'; + $name2 = 'name2-1052831874'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new GetSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->getSchema($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/GetSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSchemaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); + $request = (new GetSchemaRequest()) + ->setName($formattedName); + try { + $gapicClient->getSchema($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchemasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $schemasElement = new Schema(); + $schemas = [ + $schemasElement, + ]; + $expectedResponse = new ListSchemasResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSchemas($schemas); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSchemasRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSchemas($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/ListSchemas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchemasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSchemasRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSchemas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSchemaTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $schema = new Schema(); + $request = (new UpdateSchemaRequest()) + ->setSchema($schema); + $response = $gapicClient->updateSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/UpdateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSchemaExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $schema = new Schema(); + $request = (new UpdateSchemaRequest()) + ->setSchema($schema); + $response = $gapicClient->updateSchema($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSchemaAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSchemaTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $jsonSchema = 'jsonSchema-1150390056'; + $name = 'name3373707'; + $expectedResponse = new Schema(); + $expectedResponse->setJsonSchema($jsonSchema); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSchemaTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $schema = new Schema(); + $schemaId = 'schemaId-153006983'; + $request = (new CreateSchemaRequest()) + ->setParent($formattedParent) + ->setSchema($schema) + ->setSchemaId($schemaId); + $response = $gapicClient->createSchemaAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/CreateSchema', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSchema(); + $this->assertProtobufEquals($schema, $actualValue); + $actualValue = $actualApiRequestObject->getSchemaId(); + $this->assertProtobufEquals($schemaId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSchemaTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php new file mode 100644 index 000000000000..cf2aa8b35dc4 --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php @@ -0,0 +1,188 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SearchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SearchServiceClient($options); + } + + /** @test */ + public function searchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $attributionToken = 'attributionToken-729411015'; + $redirectUri = 'redirectUri951230089'; + $nextPageToken = ''; + $correctedQuery = 'correctedQuery107869074'; + $resultsElement = new SearchResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setRedirectUri($redirectUri); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCorrectedQuery($correctedQuery); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + $response = $gapicClient->search($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SearchService/Search', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + try { + $gapicClient->search($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $attributionToken = 'attributionToken-729411015'; + $redirectUri = 'redirectUri951230089'; + $nextPageToken = ''; + $correctedQuery = 'correctedQuery107869074'; + $resultsElement = new SearchResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setRedirectUri($redirectUri); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCorrectedQuery($correctedQuery); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); + $request = (new SearchRequest()) + ->setServingConfig($formattedServingConfig); + $response = $gapicClient->searchAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.SearchService/Search', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php new file mode 100644 index 000000000000..25ab3d5e665b --- /dev/null +++ b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php @@ -0,0 +1,390 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return UserEventServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new UserEventServiceClient($options); + } + + /** @test */ + public function collectUserEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $contentType = 'contentType831846208'; + $data = '-86'; + $expectedResponse = new HttpBody(); + $expectedResponse->setContentType($contentType); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->collectUserEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/CollectUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function collectUserEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + try { + $gapicClient->collectUserEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importUserEventsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importUserEventsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $joinedEventsCount = 720068705; + $unjoinedEventsCount = 512159846; + $expectedResponse = new ImportUserEventsResponse(); + $expectedResponse->setJoinedEventsCount($joinedEventsCount); + $expectedResponse->setUnjoinedEventsCount($unjoinedEventsCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importUserEventsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ImportUserEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importUserEvents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/ImportUserEvents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importUserEventsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importUserEventsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ImportUserEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importUserEvents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function writeUserEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $eventType = 'eventType984376767'; + $userPseudoId = 'userPseudoId-1850666040'; + $directUserRequest = false; + $sessionId = 'sessionId1661853540'; + $attributionToken = 'attributionToken-729411015'; + $filter = 'filter-1274492040'; + $expectedResponse = new UserEvent(); + $expectedResponse->setEventType($eventType); + $expectedResponse->setUserPseudoId($userPseudoId); + $expectedResponse->setDirectUserRequest($directUserRequest); + $expectedResponse->setSessionId($sessionId); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setFilter($filter); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->writeUserEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/WriteUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeUserEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new WriteUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + try { + $gapicClient->writeUserEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function collectUserEventAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $contentType = 'contentType831846208'; + $data = '-86'; + $expectedResponse = new HttpBody(); + $expectedResponse->setContentType($contentType); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $userEvent = 'userEvent1921940774'; + $request = (new CollectUserEventRequest()) + ->setParent($formattedParent) + ->setUserEvent($userEvent); + $response = $gapicClient->collectUserEventAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/CollectUserEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 258599c48265266990f1f79b6006266081d64b3a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 27 Jul 2023 18:58:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1Beta/CompletionService.php | 11 +- .../metadata}/V1Beta/Conversation.php | Bin .../V1Beta/ConversationalSearchService.php | 0 .../metadata/V1Beta/SearchService.php | Bin 5782 -> 6361 bytes DiscoveryEngine/metadata/V1Beta/UserEvent.php | Bin 3337 -> 3329 bytes .../converse_conversation.php | 0 .../create_conversation.php | 0 .../delete_conversation.php | 0 .../get_conversation.php | 0 .../list_conversations.php | 0 .../update_conversation.php | 0 .../DocumentServiceClient/list_documents.php | 3 +- .../RecommendationServiceClient/recommend.php | 2 +- .../collect_user_event.php | 2 +- .../write_user_event.php | 2 +- DiscoveryEngine/src/V1beta/BigQuerySource.php | 24 +- .../ConversationalSearchServiceBaseClient.php | 188 ++- .../BaseClient/UserEventServiceBaseClient.php | 2 +- .../ConversationalSearchServiceClient.php | 0 .../src/V1beta/CollectUserEventRequest.php | 8 +- .../src/V1beta/CompleteQueryRequest.php | 58 +- .../src/V1beta/CompleteQueryResponse.php | 42 + DiscoveryEngine/src/V1beta/CompletionInfo.php | 24 +- .../src}/V1beta/Conversation.php | 0 .../src}/V1beta/Conversation/State.php | 2 - .../src}/V1beta/ConversationContext.php | 0 .../src}/V1beta/ConversationMessage.php | 0 .../V1beta/ConverseConversationRequest.php | 0 .../V1beta/ConverseConversationResponse.php | 0 .../src}/V1beta/CreateConversationRequest.php | 0 .../src}/V1beta/DeleteConversationRequest.php | 0 DiscoveryEngine/src/V1beta/Document.php | 18 +- DiscoveryEngine/src/V1beta/DocumentInfo.php | 23 +- DiscoveryEngine/src/V1beta/GcsSource.php | 48 +- .../src}/V1beta/GetConversationRequest.php | 0 .../src/V1beta/ImportDocumentsMetadata.php | 4 +- .../src/V1beta/ImportDocumentsRequest.php | 24 +- .../ReconciliationMode.php | 2 +- .../src/V1beta/ImportErrorConfig.php | 6 +- .../src/V1beta/ImportUserEventsMetadata.php | 2 +- .../src}/V1beta/ListConversationsRequest.php | 0 .../src}/V1beta/ListConversationsResponse.php | 0 .../src/V1beta/ListDocumentsRequest.php | 15 +- DiscoveryEngine/src/V1beta/MediaInfo.php | 32 +- DiscoveryEngine/src/V1beta/PageInfo.php | 24 +- .../src}/V1beta/Reply.php | 0 .../src}/V1beta/Reply/Reference.php | 2 - DiscoveryEngine/src/V1beta/SearchInfo.php | 48 +- DiscoveryEngine/src/V1beta/SearchRequest.php | 132 +- .../SearchRequest/ContentSearchSpec.php | 27 +- .../ExtractiveContentSpec.php | 131 +- .../ContentSearchSpec/SnippetSpec.php | 114 +- .../ContentSearchSpec/SummarySpec.php | 257 +++- .../src/V1beta/SearchRequest/FacetSpec.php | 80 +- .../SearchRequest/FacetSpec/FacetKey.php | 40 +- .../src}/V1beta/SearchRequest/ImageQuery.php | 2 - .../SearchResponse/GuidedSearchResult.php | 34 + .../src/V1beta/SearchResponse/Summary.php | 38 + .../Summary/SummarySkippedReason.php | 2 - .../src}/V1beta/TextInput.php | 0 .../src}/V1beta/UpdateConversationRequest.php | 0 DiscoveryEngine/src/V1beta/UserEvent.php | 116 +- DiscoveryEngine/src/V1beta/UserInfo.php | 12 +- .../src/V1beta/gapic_metadata.json | 67 +- .../completion_service_rest_client_config.php | 24 + ...sational_search_service_client_config.json | 0 ...ional_search_service_descriptor_config.php | 0 ...onal_search_service_rest_client_config.php | 0 .../document_service_rest_client_config.php | 24 + ...ommendation_service_rest_client_config.php | 24 + .../schema_service_rest_client_config.php | 24 + .../search_service_rest_client_config.php | 24 + .../user_event_service_rest_client_config.php | 24 + .../Client/CompletionServiceClientTest.php | 4 + .../ConversationalSearchServiceClientTest.php | 0 .../Cloud/Discoveryengine/V1/Common.php | 38 - .../Discoveryengine/V1/CompletionService.php | 45 - .../Cloud/Discoveryengine/V1/Document.php | Bin 1797 -> 0 bytes .../Discoveryengine/V1/DocumentService.php | 69 - .../Cloud/Discoveryengine/V1/ImportConfig.php | Bin 3815 -> 0 bytes .../Cloud/Discoveryengine/V1/PurgeConfig.php | 44 - .../Cloud/Discoveryengine/V1/Schema.php | Bin 1478 -> 0 bytes .../Discoveryengine/V1/SchemaService.php | 76 -- .../Discoveryengine/V1/SearchService.php | Bin 3710 -> 0 bytes .../Cloud/Discoveryengine/V1/UserEvent.php | Bin 3252 -> 0 bytes .../Discoveryengine/V1/UserEventService.php | Bin 3116 -> 0 bytes .../DiscoveryEngine/V1/BigQuerySource.php | 325 ----- .../V1/CollectUserEventRequest.php | 217 --- .../V1/CompleteQueryRequest.php | 271 ---- .../V1/CompleteQueryResponse.php | 73 - .../CompleteQueryResponse/QuerySuggestion.php | 70 - .../DiscoveryEngine/V1/CompletionInfo.php | 106 -- .../V1/CreateDocumentRequest.php | 243 ---- .../V1/CreateSchemaMetadata.php | 125 -- .../V1/CreateSchemaRequest.php | 201 --- .../DiscoveryEngine/V1/CustomAttribute.php | 158 --- .../V1/DeleteDocumentRequest.php | 120 -- .../V1/DeleteSchemaMetadata.php | 125 -- .../V1/DeleteSchemaRequest.php | 88 -- .../Cloud/DiscoveryEngine/V1/Document.php | 393 ------ .../DiscoveryEngine/V1/Document/Content.php | 181 --- .../Cloud/DiscoveryEngine/V1/DocumentInfo.php | 213 --- .../Cloud/DiscoveryEngine/V1/GcsSource.php | 181 --- .../DiscoveryEngine/V1/GetDocumentRequest.php | 120 -- .../DiscoveryEngine/V1/GetSchemaRequest.php | 88 -- .../V1/ImportDocumentsMetadata.php | 194 --- .../V1/ImportDocumentsRequest.php | 493 ------- .../ImportDocumentsRequest/InlineSource.php | 78 -- .../ReconciliationMode.php | 66 - .../V1/ImportDocumentsResponse.php | 114 -- .../DiscoveryEngine/V1/ImportErrorConfig.php | 84 -- .../V1/ImportUserEventsMetadata.php | 194 --- .../V1/ImportUserEventsRequest.php | 227 ---- .../ImportUserEventsRequest/InlineSource.php | 70 - .../V1/ImportUserEventsResponse.php | 189 --- .../V1/ListDocumentsRequest.php | 226 ---- .../V1/ListDocumentsResponse.php | 115 -- .../DiscoveryEngine/V1/ListSchemasRequest.php | 192 --- .../V1/ListSchemasResponse.php | 115 -- .../Cloud/DiscoveryEngine/V1/MediaInfo.php | 149 --- .../Cloud/DiscoveryEngine/V1/PageInfo.php | 253 ---- .../Cloud/DiscoveryEngine/V1/PanelInfo.php | 213 --- .../V1/PurgeDocumentsMetadata.php | 194 --- .../V1/PurgeDocumentsRequest.php | 153 --- .../V1/PurgeDocumentsResponse.php | 112 -- .../Cloud/DiscoveryEngine/V1/Schema.php | 154 --- .../Cloud/DiscoveryEngine/V1/SearchInfo.php | 233 ---- .../DiscoveryEngine/V1/SearchRequest.php | 779 ----------- .../V1/SearchRequest/ContentSearchSpec.php | 85 -- .../ContentSearchSpec/SnippetSpec.php | 116 -- .../V1/SearchRequest/QueryExpansionSpec.php | 75 -- .../QueryExpansionSpec/Condition.php | 68 - .../V1/SearchRequest/SpellCorrectionSpec.php | 78 -- .../SpellCorrectionSpec/Mode.php | 70 - .../DiscoveryEngine/V1/SearchResponse.php | 253 ---- .../V1/SearchResponse/SearchResult.php | 122 -- .../DiscoveryEngine/V1/TransactionInfo.php | 369 ----- .../V1/UpdateDocumentRequest.php | 149 --- .../V1/UpdateSchemaMetadata.php | 125 -- .../V1/UpdateSchemaRequest.php | 121 -- .../Cloud/DiscoveryEngine/V1/UserEvent.php | 1166 ---------------- .../Cloud/DiscoveryEngine/V1/UserInfo.php | 165 --- .../V1/WriteUserEventRequest.php | 115 -- .../complete_query.php | 81 -- .../DocumentServiceClient/create_document.php | 98 -- .../DocumentServiceClient/delete_document.php | 84 -- .../V1/DocumentServiceClient/get_document.php | 86 -- .../import_documents.php | 96 -- .../DocumentServiceClient/list_documents.php | 88 -- .../DocumentServiceClient/purge_documents.php | 109 -- .../DocumentServiceClient/update_document.php | 59 - .../V1/SchemaServiceClient/create_schema.php | 96 -- .../V1/SchemaServiceClient/delete_schema.php | 86 -- .../V1/SchemaServiceClient/get_schema.php | 77 -- .../V1/SchemaServiceClient/list_schemas.php | 77 -- .../V1/SchemaServiceClient/update_schema.php | 71 - .../samples/V1/SearchServiceClient/search.php | 84 -- .../collect_user_event.php | 80 -- .../import_user_events.php | 144 -- .../write_user_event.php | 117 -- .../CompletionServiceBaseClient.php | 280 ---- .../BaseClient/DocumentServiceBaseClient.php | 584 -------- .../BaseClient/SchemaServiceBaseClient.php | 496 ------- .../BaseClient/SearchServiceBaseClient.php | 354 ----- .../BaseClient/UserEventServiceBaseClient.php | 456 ------- .../src/V1/Client/CompletionServiceClient.php | 40 - .../src/V1/Client/DocumentServiceClient.php | 40 - .../v1/src/V1/Client/SchemaServiceClient.php | 40 - .../v1/src/V1/Client/SearchServiceClient.php | 40 - .../src/V1/Client/UserEventServiceClient.php | 40 - .../v1/src/V1/gapic_metadata.json | 139 -- .../completion_service_client_config.json | 39 - .../completion_service_descriptor_config.php | 25 - .../completion_service_rest_client_config.php | 134 -- .../document_service_client_config.json | 81 -- .../document_service_descriptor_config.php | 123 -- .../document_service_rest_client_config.php | 251 ---- .../schema_service_client_config.json | 59 - .../schema_service_descriptor_config.php | 106 -- .../schema_service_rest_client_config.php | 213 --- .../search_service_client_config.json | 39 - .../search_service_descriptor_config.php | 36 - .../search_service_rest_client_config.php | 136 -- .../user_event_service_client_config.json | 61 - .../user_event_service_descriptor_config.php | 59 - .../user_event_service_rest_client_config.php | 172 --- .../V1/Client/CompletionServiceClientTest.php | 161 --- .../V1/Client/DocumentServiceClientTest.php | 732 ---------- .../V1/Client/SchemaServiceClientTest.php | 669 ---------- .../V1/Client/SearchServiceClientTest.php | 184 --- .../V1/Client/UserEventServiceClientTest.php | 401 ------ .../Cloud/Discoveryengine/V1Beta/Common.php | Bin 1919 -> 0 bytes .../V1Beta/CompletionService.php | 48 - .../Cloud/Discoveryengine/V1Beta/Document.php | Bin 1838 -> 0 bytes .../V1Beta/DocumentService.php | 69 - .../Discoveryengine/V1Beta/ImportConfig.php | Bin 3905 -> 0 bytes .../Discoveryengine/V1Beta/PurgeConfig.php | 44 - .../V1Beta/RecommendationService.php | 65 - .../Cloud/Discoveryengine/V1Beta/Schema.php | Bin 1515 -> 0 bytes .../Discoveryengine/V1Beta/SchemaService.php | 76 -- .../Discoveryengine/V1Beta/SearchService.php | Bin 6361 -> 0 bytes .../Discoveryengine/V1Beta/UserEvent.php | Bin 3329 -> 0 bytes .../V1Beta/UserEventService.php | Bin 3221 -> 0 bytes .../DiscoveryEngine/V1beta/BigQuerySource.php | 325 ----- .../V1beta/CollectUserEventRequest.php | 217 --- .../V1beta/CompleteQueryRequest.php | 321 ----- .../V1beta/CompleteQueryResponse.php | 115 -- .../CompleteQueryResponse/QuerySuggestion.php | 70 - .../DiscoveryEngine/V1beta/CompletionInfo.php | 114 -- .../V1beta/CreateDocumentRequest.php | 243 ---- .../V1beta/CreateSchemaMetadata.php | 125 -- .../V1beta/CreateSchemaRequest.php | 206 --- .../V1beta/CustomAttribute.php | 158 --- .../V1beta/DeleteDocumentRequest.php | 120 -- .../V1beta/DeleteSchemaMetadata.php | 125 -- .../V1beta/DeleteSchemaRequest.php | 88 -- .../Cloud/DiscoveryEngine/V1beta/Document.php | 393 ------ .../V1beta/Document/Content.php | 193 --- .../DiscoveryEngine/V1beta/DocumentInfo.php | 216 --- .../DiscoveryEngine/V1beta/GcsSource.php | 201 --- .../V1beta/GetDocumentRequest.php | 120 -- .../V1beta/GetSchemaRequest.php | 88 -- .../V1beta/ImportDocumentsMetadata.php | 194 --- .../V1beta/ImportDocumentsRequest.php | 505 ------- .../ImportDocumentsRequest/InlineSource.php | 78 -- .../ReconciliationMode.php | 66 - .../V1beta/ImportDocumentsResponse.php | 114 -- .../V1beta/ImportErrorConfig.php | 84 -- .../V1beta/ImportUserEventsMetadata.php | 194 --- .../V1beta/ImportUserEventsRequest.php | 227 ---- .../ImportUserEventsRequest/InlineSource.php | 70 - .../V1beta/ImportUserEventsResponse.php | 189 --- .../Cloud/DiscoveryEngine/V1beta/Interval.php | 183 --- .../V1beta/ListDocumentsRequest.php | 231 ---- .../V1beta/ListDocumentsResponse.php | 115 -- .../V1beta/ListSchemasRequest.php | 192 --- .../V1beta/ListSchemasResponse.php | 115 -- .../DiscoveryEngine/V1beta/MediaInfo.php | 157 --- .../Cloud/DiscoveryEngine/V1beta/PageInfo.php | 253 ---- .../DiscoveryEngine/V1beta/PanelInfo.php | 213 --- .../V1beta/PurgeDocumentsMetadata.php | 194 --- .../V1beta/PurgeDocumentsRequest.php | 153 --- .../V1beta/PurgeDocumentsResponse.php | 112 -- .../V1beta/RecommendRequest.php | 565 -------- .../V1beta/RecommendResponse.php | 197 --- .../RecommendationResult.php | 169 --- .../Cloud/DiscoveryEngine/V1beta/Schema.php | 154 --- .../DiscoveryEngine/V1beta/SearchInfo.php | 245 ---- .../DiscoveryEngine/V1beta/SearchRequest.php | 1005 -------------- .../V1beta/SearchRequest/BoostSpec.php | 82 -- .../BoostSpec/ConditionBoostSpec.php | 188 --- .../SearchRequest/ContentSearchSpec.php | 180 --- .../ExtractiveContentSpec.php | 205 --- .../ContentSearchSpec/SnippetSpec.php | 168 --- .../ContentSearchSpec/SummarySpec.php | 301 ----- .../V1beta/SearchRequest/FacetSpec.php | 362 ----- .../SearchRequest/FacetSpec/FacetKey.php | 394 ------ .../SearchRequest/QueryExpansionSpec.php | 75 -- .../QueryExpansionSpec/Condition.php | 68 - .../SearchRequest/SpellCorrectionSpec.php | 78 -- .../SpellCorrectionSpec/Mode.php | 70 - .../DiscoveryEngine/V1beta/SearchResponse.php | 479 ------- .../V1beta/SearchResponse/Facet.php | 142 -- .../SearchResponse/Facet/FacetValue.php | 151 --- .../SearchResponse/GuidedSearchResult.php | 105 -- .../RefinementAttribute.php | 104 -- .../V1beta/SearchResponse/SearchResult.php | 122 -- .../V1beta/SearchResponse/Summary.php | 108 -- .../V1beta/TransactionInfo.php | 377 ------ .../V1beta/UpdateDocumentRequest.php | 153 --- .../V1beta/UpdateSchemaMetadata.php | 125 -- .../V1beta/UpdateSchemaRequest.php | 129 -- .../DiscoveryEngine/V1beta/UserEvent.php | 1186 ----------------- .../Cloud/DiscoveryEngine/V1beta/UserInfo.php | 161 --- .../V1beta/WriteUserEventRequest.php | 115 -- .../complete_query.php | 81 -- .../DocumentServiceClient/create_document.php | 98 -- .../DocumentServiceClient/delete_document.php | 84 -- .../DocumentServiceClient/get_document.php | 86 -- .../import_documents.php | 96 -- .../DocumentServiceClient/list_documents.php | 89 -- .../DocumentServiceClient/purge_documents.php | 110 -- .../DocumentServiceClient/update_document.php | 59 - .../RecommendationServiceClient/recommend.php | 126 -- .../SchemaServiceClient/create_schema.php | 96 -- .../SchemaServiceClient/delete_schema.php | 86 -- .../V1beta/SchemaServiceClient/get_schema.php | 77 -- .../SchemaServiceClient/list_schemas.php | 77 -- .../SchemaServiceClient/update_schema.php | 71 - .../V1beta/SearchServiceClient/search.php | 84 -- .../collect_user_event.php | 80 -- .../import_user_events.php | 90 -- .../write_user_event.php | 117 -- .../CompletionServiceBaseClient.php | 294 ---- .../BaseClient/DocumentServiceBaseClient.php | 622 --------- .../RecommendationServiceBaseClient.php | 380 ------ .../BaseClient/SchemaServiceBaseClient.php | 528 -------- .../BaseClient/SearchServiceBaseClient.php | 374 ------ .../BaseClient/UserEventServiceBaseClient.php | 484 ------- .../V1beta/Client/CompletionServiceClient.php | 42 - .../V1beta/Client/DocumentServiceClient.php | 42 - .../Client/RecommendationServiceClient.php | 42 - .../src/V1beta/Client/SchemaServiceClient.php | 42 - .../src/V1beta/Client/SearchServiceClient.php | 42 - .../V1beta/Client/UserEventServiceClient.php | 42 - .../v1beta/src/V1beta/gapic_metadata.json | 192 --- .../completion_service_client_config.json | 39 - .../completion_service_descriptor_config.php | 25 - .../completion_service_rest_client_config.php | 150 --- .../document_service_client_config.json | 81 -- .../document_service_descriptor_config.php | 123 -- .../document_service_rest_client_config.php | 267 ---- .../recommendation_service_client_config.json | 39 - ...commendation_service_descriptor_config.php | 28 - ...ommendation_service_rest_client_config.php | 152 --- .../schema_service_client_config.json | 59 - .../schema_service_descriptor_config.php | 106 -- .../schema_service_rest_client_config.php | 229 ---- .../search_service_client_config.json | 39 - .../search_service_descriptor_config.php | 36 - .../search_service_rest_client_config.php | 152 --- .../user_event_service_client_config.json | 61 - .../user_event_service_descriptor_config.php | 59 - .../user_event_service_rest_client_config.php | 188 --- .../Client/CompletionServiceClientTest.php | 165 --- .../Client/DocumentServiceClientTest.php | 732 ---------- .../RecommendationServiceClientTest.php | 182 --- .../V1beta/Client/SchemaServiceClientTest.php | 669 ---------- .../V1beta/Client/SearchServiceClientTest.php | 188 --- .../Client/UserEventServiceClientTest.php | 390 ------ 330 files changed, 1308 insertions(+), 43709 deletions(-) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine => DiscoveryEngine/metadata}/V1Beta/Conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine => DiscoveryEngine/metadata}/V1Beta/ConversationalSearchService.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php (83%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/src/V1beta/Client/ConversationalSearchServiceClient.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/Conversation.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/Conversation/State.php (90%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ConversationContext.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ConversationMessage.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ConverseConversationRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ConverseConversationResponse.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/CreateConversationRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/DeleteConversationRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/GetConversationRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ListConversationsRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/ListConversationsResponse.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/Reply.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/Reply/Reference.php (95%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/SearchRequest/ImageQuery.php (91%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/SearchResponse/Summary/SummarySkippedReason.php (93%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/TextInput.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine => DiscoveryEngine/src}/V1beta/UpdateConversationRequest.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/src/V1beta/resources/conversational_search_service_client_config.json (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/src/V1beta/resources/conversational_search_service_descriptor_config.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/src/V1beta/resources/conversational_search_service_rest_client_config.php (100%) rename {owl-bot-staging/DiscoveryEngine/v1beta => DiscoveryEngine}/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php (100%) delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEventService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/BigQuerySource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/DocumentServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/SchemaServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/SearchServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/UserEventServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/CompletionService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/SchemaService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/SearchService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/UserEvent.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/UserEventService.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/BigQuerySource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/DocumentServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/RecommendationServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/SchemaServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/SearchServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/UserEventServiceClient.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php delete mode 100644 owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php diff --git a/DiscoveryEngine/metadata/V1Beta/CompletionService.php b/DiscoveryEngine/metadata/V1Beta/CompletionService.php index 1e9365bc3ba3..8590f5d12085 100644 --- a/DiscoveryEngine/metadata/V1Beta/CompletionService.php +++ b/DiscoveryEngine/metadata/V1Beta/CompletionService.php @@ -20,17 +20,20 @@ public static function initOnce() { \GPBMetadata\Google\Api\Resource::initOnce(); $pool->internalAddGeneratedFile( ' -� -9gM#<6Xx!))D%KBI2rGAE#v_V&|O{Ib#m-HY&_5^9vt^;&a1yEb9XBSGldCCq^&XmRxg6>ZioOwbCfoAz)TjtCx_ff1OF?Q?XBpf=>p zvF&&S8>0ur^9|25rp2h43F^RhLD)_b5L%Yu&9G0%#I(l+IiJNHz((}#WFxX_U+AYy zeC?DDsNc~u^n4AqAba1LPMwE1bW@FAz5#TqQH$LbKGJYO%e~PuTqe8SAn(5N}F7Nfb`cB|BN+g*&3E@v6k%!uz_ID5M=(QIj@>&O!04oQVEz>% delta 152 zcmcawqaGi_$s%+8z0=@;@T#%Y9B*`V1n^+NF3=xV?&M(a?kziC{)L<17adK_5z{IEY}#hgeE%*3Qt}wTs7HA#Dh_Oa*v4o=3}D5%mC`r BFL(d| diff --git a/DiscoveryEngine/metadata/V1Beta/UserEvent.php b/DiscoveryEngine/metadata/V1Beta/UserEvent.php index 1aefe67ee3c0e59eeaead538697c023324212582..a78259f471ca562875f9af9980c6de20c5d4dc0f 100644 GIT binary patch delta 66 zcmeB_YLwcb$;{ZZS&MlFo8B5mE*_WsPBaiJ delta 74 zcmZpa>Xh1`$;>!qvljCVHnS~^Ts$uM$)&lec_p5CY578eTuhlM5{wFr8k|nd4;-01 Z7=-M(Sn?8cQze+dg8D$g%^x@gnE~op643wv diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/converse_conversation.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_conversation.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_conversation.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_conversation.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_conversations.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php rename to DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_conversation.php diff --git a/DiscoveryEngine/samples/V1beta/DocumentServiceClient/list_documents.php b/DiscoveryEngine/samples/V1beta/DocumentServiceClient/list_documents.php index b2ec2baaa235..e988fa91ef9b 100644 --- a/DiscoveryEngine/samples/V1beta/DocumentServiceClient/list_documents.php +++ b/DiscoveryEngine/samples/V1beta/DocumentServiceClient/list_documents.php @@ -37,7 +37,8 @@ * Use `default_branch` as the branch ID, to list documents under the default * branch. * - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. Please see * {@see DocumentServiceClient::branchName()} for help formatting this field. diff --git a/DiscoveryEngine/samples/V1beta/RecommendationServiceClient/recommend.php b/DiscoveryEngine/samples/V1beta/RecommendationServiceClient/recommend.php index 1d506baf19fd..e22490379b2f 100644 --- a/DiscoveryEngine/samples/V1beta/RecommendationServiceClient/recommend.php +++ b/DiscoveryEngine/samples/V1beta/RecommendationServiceClient/recommend.php @@ -68,7 +68,7 @@ * quality. * * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client diff --git a/DiscoveryEngine/samples/V1beta/UserEventServiceClient/collect_user_event.php b/DiscoveryEngine/samples/V1beta/UserEventServiceClient/collect_user_event.php index a6f2e7f12231..84f50ea1967d 100644 --- a/DiscoveryEngine/samples/V1beta/UserEventServiceClient/collect_user_event.php +++ b/DiscoveryEngine/samples/V1beta/UserEventServiceClient/collect_user_event.php @@ -30,7 +30,7 @@ /** * Writes a single user event from the browser. This uses a GET request to - * due to browser restriction of POST-ing to a 3rd party domain. + * due to browser restriction of POST-ing to a third-party domain. * * This method is used only by the Discovery Engine API JavaScript pixel and * Google Tag Manager. Users should not call this method directly. diff --git a/DiscoveryEngine/samples/V1beta/UserEventServiceClient/write_user_event.php b/DiscoveryEngine/samples/V1beta/UserEventServiceClient/write_user_event.php index 889fb8188328..eaf89dfa96f2 100644 --- a/DiscoveryEngine/samples/V1beta/UserEventServiceClient/write_user_event.php +++ b/DiscoveryEngine/samples/V1beta/UserEventServiceClient/write_user_event.php @@ -64,7 +64,7 @@ * quality. * * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client diff --git a/DiscoveryEngine/src/V1beta/BigQuerySource.php b/DiscoveryEngine/src/V1beta/BigQuerySource.php index 3ed7537a9ca0..990afcce1752 100644 --- a/DiscoveryEngine/src/V1beta/BigQuerySource.php +++ b/DiscoveryEngine/src/V1beta/BigQuerySource.php @@ -58,9 +58,9 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] * or * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. * * Generated from protobuf field string data_schema = 6; */ @@ -102,9 +102,9 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] * or * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. * } */ public function __construct($data = NULL) { @@ -272,9 +272,9 @@ public function setGcsStagingDir($var) * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] * or * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. * * Generated from protobuf field string data_schema = 6; * @return string @@ -297,9 +297,9 @@ public function getDataSchema() * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] * or * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. + * * `custom`: One custom data per row in arbitrary format that conforms to + * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + * data store. This can only be used by Gen App Builder. * * Generated from protobuf field string data_schema = 6; * @param string $var diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php b/DiscoveryEngine/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php similarity index 83% rename from owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php rename to DiscoveryEngine/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php index 75c1448a2225..bff377c1db87 100644 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php +++ b/DiscoveryEngine/src/V1beta/Client/BaseClient/ConversationalSearchServiceBaseClient.php @@ -95,16 +95,25 @@ private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/conversational_search_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/conversational_search_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/conversational_search_service_grpc_config.json', + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . + '/../../resources/conversational_search_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../../resources/conversational_search_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . + '/../../resources/conversational_search_service_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/conversational_search_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . + '/../../resources/conversational_search_service_rest_client_config.php', ], ], ]; @@ -123,8 +132,12 @@ private static function getClientDefaults() * * @experimental */ - public static function conversationName(string $project, string $location, string $dataStore, string $conversation): string - { + public static function conversationName( + string $project, + string $location, + string $dataStore, + string $conversation + ): string { return self::getPathTemplate('conversation')->render([ 'project' => $project, 'location' => $location, @@ -145,8 +158,11 @@ public static function conversationName(string $project, string $location, strin * * @experimental */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { + public static function dataStoreName( + string $project, + string $location, + string $dataStore + ): string { return self::getPathTemplate('dataStore')->render([ 'project' => $project, 'location' => $location, @@ -167,9 +183,15 @@ public static function dataStoreName(string $project, string $location, string $ * * @experimental */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + public static function projectLocationCollectionDataStoreName( + string $project, + string $location, + string $collection, + string $dataStore + ): string { + return self::getPathTemplate( + 'projectLocationCollectionDataStore' + )->render([ 'project' => $project, 'location' => $location, 'collection' => $collection, @@ -191,9 +213,16 @@ public static function projectLocationCollectionDataStoreName(string $project, s * * @experimental */ - public static function projectLocationCollectionDataStoreConversationName(string $project, string $location, string $collection, string $dataStore, string $conversation): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreConversation')->render([ + public static function projectLocationCollectionDataStoreConversationName( + string $project, + string $location, + string $collection, + string $dataStore, + string $conversation + ): string { + return self::getPathTemplate( + 'projectLocationCollectionDataStoreConversation' + )->render([ 'project' => $project, 'location' => $location, 'collection' => $collection, @@ -216,9 +245,16 @@ public static function projectLocationCollectionDataStoreConversationName(string * * @experimental */ - public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + public static function projectLocationCollectionDataStoreServingConfigName( + string $project, + string $location, + string $collection, + string $dataStore, + string $servingConfig + ): string { + return self::getPathTemplate( + 'projectLocationCollectionDataStoreServingConfig' + )->render([ 'project' => $project, 'location' => $location, 'collection' => $collection, @@ -239,8 +275,11 @@ public static function projectLocationCollectionDataStoreServingConfigName(strin * * @experimental */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { + public static function projectLocationDataStoreName( + string $project, + string $location, + string $dataStore + ): string { return self::getPathTemplate('projectLocationDataStore')->render([ 'project' => $project, 'location' => $location, @@ -261,9 +300,15 @@ public static function projectLocationDataStoreName(string $project, string $loc * * @experimental */ - public static function projectLocationDataStoreConversationName(string $project, string $location, string $dataStore, string $conversation): string - { - return self::getPathTemplate('projectLocationDataStoreConversation')->render([ + public static function projectLocationDataStoreConversationName( + string $project, + string $location, + string $dataStore, + string $conversation + ): string { + return self::getPathTemplate( + 'projectLocationDataStoreConversation' + )->render([ 'project' => $project, 'location' => $location, 'data_store' => $dataStore, @@ -284,9 +329,15 @@ public static function projectLocationDataStoreConversationName(string $project, * * @experimental */ - public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + public static function projectLocationDataStoreServingConfigName( + string $project, + string $location, + string $dataStore, + string $servingConfig + ): string { + return self::getPathTemplate( + 'projectLocationDataStoreServingConfig' + )->render([ 'project' => $project, 'location' => $location, 'data_store' => $dataStore, @@ -307,8 +358,12 @@ public static function projectLocationDataStoreServingConfigName(string $project * * @experimental */ - public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { + public static function servingConfigName( + string $project, + string $location, + string $dataStore, + string $servingConfig + ): string { return self::getPathTemplate('servingConfig')->render([ 'project' => $project, 'location' => $location, @@ -346,8 +401,10 @@ public static function servingConfigName(string $project, string $location, stri * * @experimental */ - public static function parseName(string $formattedName, string $template = null): array - { + public static function parseName( + string $formattedName, + string $template = null + ): array { return self::parseFormattedName($formattedName, $template); } @@ -417,7 +474,10 @@ public function __construct(array $options = []) public function __call($method, $args) { if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + trigger_error( + 'Call to undefined method ' . __CLASS__ . "::$method()", + E_USER_ERROR + ); } array_unshift($args, substr($method, 0, -5)); @@ -447,9 +507,15 @@ public function __call($method, $args) * * @experimental */ - public function converseConversation(ConverseConversationRequest $request, array $callOptions = []): ConverseConversationResponse - { - return $this->startApiCall('ConverseConversation', $request, $callOptions)->wait(); + public function converseConversation( + ConverseConversationRequest $request, + array $callOptions = [] + ): ConverseConversationResponse { + return $this->startApiCall( + 'ConverseConversation', + $request, + $callOptions + )->wait(); } /** @@ -478,9 +544,15 @@ public function converseConversation(ConverseConversationRequest $request, array * * @experimental */ - public function createConversation(CreateConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('CreateConversation', $request, $callOptions)->wait(); + public function createConversation( + CreateConversationRequest $request, + array $callOptions = [] + ): Conversation { + return $this->startApiCall( + 'CreateConversation', + $request, + $callOptions + )->wait(); } /** @@ -507,9 +579,15 @@ public function createConversation(CreateConversationRequest $request, array $ca * * @experimental */ - public function deleteConversation(DeleteConversationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteConversation', $request, $callOptions)->wait(); + public function deleteConversation( + DeleteConversationRequest $request, + array $callOptions = [] + ): void { + $this->startApiCall( + 'DeleteConversation', + $request, + $callOptions + )->wait(); } /** @@ -535,9 +613,15 @@ public function deleteConversation(DeleteConversationRequest $request, array $ca * * @experimental */ - public function getConversation(GetConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('GetConversation', $request, $callOptions)->wait(); + public function getConversation( + GetConversationRequest $request, + array $callOptions = [] + ): Conversation { + return $this->startApiCall( + 'GetConversation', + $request, + $callOptions + )->wait(); } /** @@ -564,8 +648,10 @@ public function getConversation(GetConversationRequest $request, array $callOpti * * @experimental */ - public function listConversations(ListConversationsRequest $request, array $callOptions = []): PagedListResponse - { + public function listConversations( + ListConversationsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListConversations', $request, $callOptions); } @@ -597,8 +683,14 @@ public function listConversations(ListConversationsRequest $request, array $call * * @experimental */ - public function updateConversation(UpdateConversationRequest $request, array $callOptions = []): Conversation - { - return $this->startApiCall('UpdateConversation', $request, $callOptions)->wait(); + public function updateConversation( + UpdateConversationRequest $request, + array $callOptions = [] + ): Conversation { + return $this->startApiCall( + 'UpdateConversation', + $request, + $callOptions + )->wait(); } } diff --git a/DiscoveryEngine/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php b/DiscoveryEngine/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php index 1479740beb69..65e0013d5f05 100644 --- a/DiscoveryEngine/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php +++ b/DiscoveryEngine/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php @@ -442,7 +442,7 @@ public function __call($method, $args) /** * Writes a single user event from the browser. This uses a GET request to - * due to browser restriction of POST-ing to a 3rd party domain. + * due to browser restriction of POST-ing to a third-party domain. * * This method is used only by the Discovery Engine API JavaScript pixel and * Google Tag Manager. Users should not call this method directly. diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/ConversationalSearchServiceClient.php b/DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/ConversationalSearchServiceClient.php rename to DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php diff --git a/DiscoveryEngine/src/V1beta/CollectUserEventRequest.php b/DiscoveryEngine/src/V1beta/CollectUserEventRequest.php index de15267fa759..9d2ffc416c07 100644 --- a/DiscoveryEngine/src/V1beta/CollectUserEventRequest.php +++ b/DiscoveryEngine/src/V1beta/CollectUserEventRequest.php @@ -32,7 +32,7 @@ class CollectUserEventRequest extends \Google\Protobuf\Internal\Message /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party + * referer URL, because many browsers only send the domain for third-party * requests. * * Generated from protobuf field optional string uri = 3; @@ -62,7 +62,7 @@ class CollectUserEventRequest extends \Google\Protobuf\Internal\Message * @type string $uri * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party + * referer URL, because many browsers only send the domain for third-party * requests. * @type int|string $ets * The event timestamp in milliseconds. This prevents browser caching of @@ -134,7 +134,7 @@ public function setUserEvent($var) /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party + * referer URL, because many browsers only send the domain for third-party * requests. * * Generated from protobuf field optional string uri = 3; @@ -158,7 +158,7 @@ public function clearUri() /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party + * referer URL, because many browsers only send the domain for third-party * requests. * * Generated from protobuf field optional string uri = 3; diff --git a/DiscoveryEngine/src/V1beta/CompleteQueryRequest.php b/DiscoveryEngine/src/V1beta/CompleteQueryRequest.php index c8ec53ff8b07..f665058fde9f 100644 --- a/DiscoveryEngine/src/V1beta/CompleteQueryRequest.php +++ b/DiscoveryEngine/src/V1beta/CompleteQueryRequest.php @@ -46,8 +46,7 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message * Default values: * * `document` is the default model for regular dataStores. * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] - * dataStores. + * [IndustryVertical.SITE_SEARCH][] dataStores. * * Generated from protobuf field string query_model = 3; */ @@ -68,6 +67,15 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string user_pseudo_id = 4; */ protected $user_pseudo_id = ''; + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + */ + protected $include_tail_suggestions = false; /** * Constructor. @@ -96,8 +104,7 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message * Default values: * * `document` is the default model for regular dataStores. * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] - * dataStores. + * [IndustryVertical.SITE_SEARCH][] dataStores. * @type string $user_pseudo_id * A unique identifier for tracking visitors. For example, this could be * implemented with an HTTP cookie, which should be able to uniquely identify @@ -110,6 +117,11 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @type bool $include_tail_suggestions + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. * } */ public function __construct($data = NULL) { @@ -189,8 +201,7 @@ public function setQuery($var) * Default values: * * `document` is the default model for regular dataStores. * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] - * dataStores. + * [IndustryVertical.SITE_SEARCH][] dataStores. * * Generated from protobuf field string query_model = 3; * @return string @@ -214,8 +225,7 @@ public function getQueryModel() * Default values: * * `document` is the default model for regular dataStores. * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] - * dataStores. + * [IndustryVertical.SITE_SEARCH][] dataStores. * * Generated from protobuf field string query_model = 3; * @param string $var @@ -275,5 +285,37 @@ public function setUserPseudoId($var) return $this; } + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + * @return bool + */ + public function getIncludeTailSuggestions() + { + return $this->include_tail_suggestions; + } + + /** + * Indicates if tail suggestions should be returned if there are no + * suggestions that match the full query. Even if set to true, if there are + * suggestions that match the full query, those are returned and no + * tail suggestions are returned. + * + * Generated from protobuf field bool include_tail_suggestions = 5; + * @param bool $var + * @return $this + */ + public function setIncludeTailSuggestions($var) + { + GPBUtil::checkBool($var); + $this->include_tail_suggestions = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/CompleteQueryResponse.php b/DiscoveryEngine/src/V1beta/CompleteQueryResponse.php index 2eea62ecb7dd..9b4cf95ca911 100644 --- a/DiscoveryEngine/src/V1beta/CompleteQueryResponse.php +++ b/DiscoveryEngine/src/V1beta/CompleteQueryResponse.php @@ -24,6 +24,14 @@ class CompleteQueryResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; */ private $query_suggestions; + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + */ + protected $tail_match_triggered = false; /** * Constructor. @@ -34,6 +42,10 @@ class CompleteQueryResponse extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $query_suggestions * Results of the matched query suggestions. The result list is ordered and * the first result is a top suggestion. + * @type bool $tail_match_triggered + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. * } */ public function __construct($data = NULL) { @@ -69,5 +81,35 @@ public function setQuerySuggestions($var) return $this; } + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + * @return bool + */ + public function getTailMatchTriggered() + { + return $this->tail_match_triggered; + } + + /** + * True if the returned suggestions are all tail suggestions. + * For tail matching to be triggered, include_tail_suggestions in the request + * must be true and there must be no suggestions that match the full query. + * + * Generated from protobuf field bool tail_match_triggered = 2; + * @param bool $var + * @return $this + */ + public function setTailMatchTriggered($var) + { + GPBUtil::checkBool($var); + $this->tail_match_triggered = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/CompletionInfo.php b/DiscoveryEngine/src/V1beta/CompletionInfo.php index aa1a16ce98fb..d09e1ee7acdb 100644 --- a/DiscoveryEngine/src/V1beta/CompletionInfo.php +++ b/DiscoveryEngine/src/V1beta/CompletionInfo.php @@ -17,13 +17,15 @@ class CompletionInfo extends \Google\Protobuf\Internal\Message { /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. * * Generated from protobuf field string selected_suggestion = 1; */ protected $selected_suggestion = ''; /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] * position, starting from 0. * * Generated from protobuf field int32 selected_position = 2; @@ -37,9 +39,11 @@ class CompletionInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $selected_suggestion - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. * @type int $selected_position - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] * position, starting from 0. * } */ @@ -49,7 +53,8 @@ public function __construct($data = NULL) { } /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. * * Generated from protobuf field string selected_suggestion = 1; * @return string @@ -60,7 +65,8 @@ public function getSelectedSuggestion() } /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. * * Generated from protobuf field string selected_suggestion = 1; * @param string $var @@ -75,7 +81,8 @@ public function setSelectedSuggestion($var) } /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] * position, starting from 0. * * Generated from protobuf field int32 selected_position = 2; @@ -87,7 +94,8 @@ public function getSelectedPosition() } /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] + * End user selected + * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] * position, starting from 0. * * Generated from protobuf field int32 selected_position = 2; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php b/DiscoveryEngine/src/V1beta/Conversation.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation.php rename to DiscoveryEngine/src/V1beta/Conversation.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php b/DiscoveryEngine/src/V1beta/Conversation/State.php similarity index 90% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php rename to DiscoveryEngine/src/V1beta/Conversation/State.php index 5f2557134a94..3d1896487990 100644 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Conversation/State.php +++ b/DiscoveryEngine/src/V1beta/Conversation/State.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\DiscoveryEngine\V1beta\Conversation_State::class); diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php b/DiscoveryEngine/src/V1beta/ConversationContext.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationContext.php rename to DiscoveryEngine/src/V1beta/ConversationContext.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php b/DiscoveryEngine/src/V1beta/ConversationMessage.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConversationMessage.php rename to DiscoveryEngine/src/V1beta/ConversationMessage.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php b/DiscoveryEngine/src/V1beta/ConverseConversationRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationRequest.php rename to DiscoveryEngine/src/V1beta/ConverseConversationRequest.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php b/DiscoveryEngine/src/V1beta/ConverseConversationResponse.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ConverseConversationResponse.php rename to DiscoveryEngine/src/V1beta/ConverseConversationResponse.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php b/DiscoveryEngine/src/V1beta/CreateConversationRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateConversationRequest.php rename to DiscoveryEngine/src/V1beta/CreateConversationRequest.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php b/DiscoveryEngine/src/V1beta/DeleteConversationRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteConversationRequest.php rename to DiscoveryEngine/src/V1beta/DeleteConversationRequest.php diff --git a/DiscoveryEngine/src/V1beta/Document.php b/DiscoveryEngine/src/V1beta/Document.php index faeb67f629d5..1a0c1686f3a8 100644 --- a/DiscoveryEngine/src/V1beta/Document.php +++ b/DiscoveryEngine/src/V1beta/Document.php @@ -74,13 +74,11 @@ class Document extends \Google\Protobuf\Internal\Message * * @type \Google\Protobuf\Struct $struct_data * The structured JSON data for the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * @type string $json_data * The JSON string representation of the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * @type string $name * Immutable. The full resource name of the document. @@ -115,8 +113,7 @@ public function __construct($data = NULL) { /** * The structured JSON data for the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * * Generated from protobuf field .google.protobuf.Struct struct_data = 4; @@ -134,8 +131,7 @@ public function hasStructData() /** * The structured JSON data for the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * * Generated from protobuf field .google.protobuf.Struct struct_data = 4; @@ -152,8 +148,7 @@ public function setStructData($var) /** * The JSON string representation of the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * * Generated from protobuf field string json_data = 5; @@ -171,8 +166,7 @@ public function hasJsonData() /** * The JSON string representation of the document. It should conform to the - * registered - * [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an * `INVALID_ARGUMENT` error is thrown. * * Generated from protobuf field string json_data = 5; diff --git a/DiscoveryEngine/src/V1beta/DocumentInfo.php b/DiscoveryEngine/src/V1beta/DocumentInfo.php index f2f1a88132a0..ad0e888e6133 100644 --- a/DiscoveryEngine/src/V1beta/DocumentInfo.php +++ b/DiscoveryEngine/src/V1beta/DocumentInfo.php @@ -42,9 +42,10 @@ class DocumentInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $id - * Required. The Document resource ID. + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. * @type string $name - * Required. The Document resource full name, of the form: + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` * @type int $quantity * Quantity of the Document associated with the user event. Defaults to 1. @@ -64,9 +65,9 @@ public function __construct($data = NULL) { } /** - * Required. The Document resource ID. + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string id = 1; * @return string */ public function getId() @@ -80,9 +81,9 @@ public function hasId() } /** - * Required. The Document resource ID. + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string id = 1; * @param string $var * @return $this */ @@ -95,10 +96,11 @@ public function setId($var) } /** - * Required. The Document resource full name, of the form: + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { * @return string */ public function getName() @@ -112,10 +114,11 @@ public function hasName() } /** - * Required. The Document resource full name, of the form: + * The [Document][google.cloud.discoveryengine.v1beta.Document] resource + * full name, of the form: * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/DiscoveryEngine/src/V1beta/GcsSource.php b/DiscoveryEngine/src/V1beta/GcsSource.php index 644600d70f02..45a1309018d7 100644 --- a/DiscoveryEngine/src/V1beta/GcsSource.php +++ b/DiscoveryEngine/src/V1beta/GcsSource.php @@ -36,15 +36,15 @@ class GcsSource extends \Google\Protobuf\Internal\Message * have a valid * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 + * `input_uris` becomes a document, with the ID set to the first 128 * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by the GENERIC Data Store vertical. - * * `csv`: A CSV file with header conforming the defined + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header will be imported as a Document. - * This can only be used by the GENERIC Data Store vertical. + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -76,15 +76,15 @@ class GcsSource extends \Google\Protobuf\Internal\Message * have a valid * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 + * `input_uris` becomes a document, with the ID set to the first 128 * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by the GENERIC Data Store vertical. - * * `csv`: A CSV file with header conforming the defined + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header will be imported as a Document. - * This can only be used by the GENERIC Data Store vertical. + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -142,15 +142,15 @@ public function setInputUris($var) * have a valid * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 + * `input_uris` becomes a document, with the ID set to the first 128 * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by the GENERIC Data Store vertical. - * * `csv`: A CSV file with header conforming the defined + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header will be imported as a Document. - * This can only be used by the GENERIC Data Store vertical. + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -172,15 +172,15 @@ public function getDataSchema() * have a valid * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 + * `input_uris` becomes a document, with the ID set to the first 128 * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by the GENERIC Data Store vertical. - * * `csv`: A CSV file with header conforming the defined + * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of + * the data store. This can only be used by Gen App Builder. + * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header will be imported as a Document. - * This can only be used by the GENERIC Data Store vertical. + * data store. Each entry after the header is imported as a Document. + * This can only be used by Gen App Builder. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php b/DiscoveryEngine/src/V1beta/GetConversationRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetConversationRequest.php rename to DiscoveryEngine/src/V1beta/GetConversationRequest.php diff --git a/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php b/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php index 16d7a70135e5..feabb561b010 100644 --- a/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php +++ b/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php @@ -9,8 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata related to the progress of the ImportDocuments operation. This will - * be returned by the google.longrunning.Operation.metadata field. + * Metadata related to the progress of the ImportDocuments operation. This is + * returned by the google.longrunning.Operation.metadata field. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata */ diff --git a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php index 34daad730807..053193a657b1 100644 --- a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php +++ b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php @@ -48,7 +48,7 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. + * otherwise, documents without IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -69,12 +69,12 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * "some_uuid"}`. For * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the + * The values of the JSON field or the BigQuery column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON * field or the BigQuery column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs will fail to be imported. + * Otherwise, documents without valid IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -126,7 +126,7 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. + * otherwise, documents without IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -143,12 +143,12 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * "some_uuid"}`. For * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the + * The values of the JSON field or the BigQuery column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON * field or the BigQuery column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs will fail to be imported. + * Otherwise, documents without valid IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -368,7 +368,7 @@ public function setReconciliationMode($var) * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. + * otherwise, documents without IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -397,7 +397,7 @@ public function getAutoGenerateIds() * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. + * otherwise, documents without IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -427,12 +427,12 @@ public function setAutoGenerateIds($var) * "some_uuid"}`. For * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the + * The values of the JSON field or the BigQuery column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON * field or the BigQuery column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs will fail to be imported. + * Otherwise, documents without valid IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and @@ -462,12 +462,12 @@ public function getIdField() * "some_uuid"}`. For * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the + * The values of the JSON field or the BigQuery column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON * field or the BigQuery column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs will fail to be imported. + * Otherwise, documents without valid IDs fail to be imported. * Only set this field when using * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and diff --git a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest/ReconciliationMode.php b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest/ReconciliationMode.php index e1199eb0efde..60db71ccd6f7 100644 --- a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest/ReconciliationMode.php +++ b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest/ReconciliationMode.php @@ -15,7 +15,7 @@ class ReconciliationMode { /** - * Defaults to INCREMENTAL. + * Defaults to `INCREMENTAL`. * * Generated from protobuf enum RECONCILIATION_MODE_UNSPECIFIED = 0; */ diff --git a/DiscoveryEngine/src/V1beta/ImportErrorConfig.php b/DiscoveryEngine/src/V1beta/ImportErrorConfig.php index 13587c527081..139a27318096 100644 --- a/DiscoveryEngine/src/V1beta/ImportErrorConfig.php +++ b/DiscoveryEngine/src/V1beta/ImportErrorConfig.php @@ -25,7 +25,7 @@ class ImportErrorConfig extends \Google\Protobuf\Internal\Message * * @type string $gcs_prefix * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to + * existing Cloud Storage directory. Import errors are written to * sharded files in this directory, one per line, as a JSON-encoded * `google.rpc.Status` message. * } @@ -37,7 +37,7 @@ public function __construct($data = NULL) { /** * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to + * existing Cloud Storage directory. Import errors are written to * sharded files in this directory, one per line, as a JSON-encoded * `google.rpc.Status` message. * @@ -56,7 +56,7 @@ public function hasGcsPrefix() /** * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to + * existing Cloud Storage directory. Import errors are written to * sharded files in this directory, one per line, as a JSON-encoded * `google.rpc.Status` message. * diff --git a/DiscoveryEngine/src/V1beta/ImportUserEventsMetadata.php b/DiscoveryEngine/src/V1beta/ImportUserEventsMetadata.php index 7ec7afad623d..e3208f50df10 100644 --- a/DiscoveryEngine/src/V1beta/ImportUserEventsMetadata.php +++ b/DiscoveryEngine/src/V1beta/ImportUserEventsMetadata.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Metadata related to the progress of the Import operation. This will be + * Metadata related to the progress of the Import operation. This is * returned by the google.longrunning.Operation.metadata field. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php b/DiscoveryEngine/src/V1beta/ListConversationsRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsRequest.php rename to DiscoveryEngine/src/V1beta/ListConversationsRequest.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php b/DiscoveryEngine/src/V1beta/ListConversationsResponse.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListConversationsResponse.php rename to DiscoveryEngine/src/V1beta/ListConversationsResponse.php diff --git a/DiscoveryEngine/src/V1beta/ListDocumentsRequest.php b/DiscoveryEngine/src/V1beta/ListDocumentsRequest.php index 2f2126fce3cc..2257b17f5bff 100644 --- a/DiscoveryEngine/src/V1beta/ListDocumentsRequest.php +++ b/DiscoveryEngine/src/V1beta/ListDocumentsRequest.php @@ -22,7 +22,8 @@ class ListDocumentsRequest extends \Google\Protobuf\Internal\Message * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. * Use `default_branch` as the branch ID, to list documents under the default * branch. - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. * @@ -59,7 +60,8 @@ class ListDocumentsRequest extends \Google\Protobuf\Internal\Message * Use `default_branch` as the branch ID, to list documents under the default * branch. * - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. Please see * {@see DocumentServiceClient::branchName()} for help formatting this field. @@ -85,7 +87,8 @@ public static function build(string $parent): self * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. * Use `default_branch` as the branch ID, to list documents under the default * branch. - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. * @type int $page_size @@ -115,7 +118,8 @@ public function __construct($data = NULL) { * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. * Use `default_branch` as the branch ID, to list documents under the default * branch. - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. * @@ -132,7 +136,8 @@ public function getParent() * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. * Use `default_branch` as the branch ID, to list documents under the default * branch. - * If the caller does not have permission to list [Documents][]s under this + * If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1beta.Document]s under this * branch, regardless of whether or not this branch exists, a * `PERMISSION_DENIED` error is returned. * diff --git a/DiscoveryEngine/src/V1beta/MediaInfo.php b/DiscoveryEngine/src/V1beta/MediaInfo.php index 44834c68deda..4a42fda0d13f 100644 --- a/DiscoveryEngine/src/V1beta/MediaInfo.php +++ b/DiscoveryEngine/src/V1beta/MediaInfo.php @@ -18,14 +18,16 @@ class MediaInfo extends \Google\Protobuf\Internal\Message /** * The media progress time in seconds, if applicable. * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. * * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; */ protected $media_progress_duration = null; /** - * Media progress should be computed using only the media_progress_duration + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] * relative to the media total length. * This value must be between `[0, 1.0]` inclusive. * If this is not a playback or the progress cannot be computed (e.g. ongoing @@ -44,10 +46,12 @@ class MediaInfo extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Duration $media_progress_duration * The media progress time in seconds, if applicable. * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. * @type float $media_progress_percentage - * Media progress should be computed using only the media_progress_duration + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] * relative to the media total length. * This value must be between `[0, 1.0]` inclusive. * If this is not a playback or the progress cannot be computed (e.g. ongoing @@ -62,8 +66,9 @@ public function __construct($data = NULL) { /** * The media progress time in seconds, if applicable. * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. * * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; * @return \Google\Protobuf\Duration|null @@ -86,8 +91,9 @@ public function clearMediaProgressDuration() /** * The media progress time in seconds, if applicable. * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. + * then + * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + * should be set to 90. * * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; * @param \Google\Protobuf\Duration $var @@ -102,7 +108,8 @@ public function setMediaProgressDuration($var) } /** - * Media progress should be computed using only the media_progress_duration + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] * relative to the media total length. * This value must be between `[0, 1.0]` inclusive. * If this is not a playback or the progress cannot be computed (e.g. ongoing @@ -127,7 +134,8 @@ public function clearMediaProgressPercentage() } /** - * Media progress should be computed using only the media_progress_duration + * Media progress should be computed using only the + * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] * relative to the media total length. * This value must be between `[0, 1.0]` inclusive. * If this is not a playback or the progress cannot be computed (e.g. ongoing diff --git a/DiscoveryEngine/src/V1beta/PageInfo.php b/DiscoveryEngine/src/V1beta/PageInfo.php index c23014301f01..8d5046740830 100644 --- a/DiscoveryEngine/src/V1beta/PageInfo.php +++ b/DiscoveryEngine/src/V1beta/PageInfo.php @@ -19,7 +19,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message * A unique ID of a web page view. * This should be kept the same for all user events triggered from the same * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should + * events as the user is browsing the page. The `pageview_id` property should * be kept the same for all these events so that they can be grouped together * properly. * When using the client side event reporting with JavaScript pixel and Google @@ -35,9 +35,9 @@ class PageInfo extends \Google\Protobuf\Internal\Message * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string page_category = 2; */ @@ -71,7 +71,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message * A unique ID of a web page view. * This should be kept the same for all user events triggered from the same * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should + * events as the user is browsing the page. The `pageview_id` property should * be kept the same for all these events so that they can be grouped together * properly. * When using the client side event reporting with JavaScript pixel and Google @@ -83,9 +83,9 @@ class PageInfo extends \Google\Protobuf\Internal\Message * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type string $uri * Complete URL (window.location.href) of the user's current page. * When using the client side event reporting with JavaScript pixel and Google @@ -107,7 +107,7 @@ public function __construct($data = NULL) { * A unique ID of a web page view. * This should be kept the same for all user events triggered from the same * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should + * events as the user is browsing the page. The `pageview_id` property should * be kept the same for all these events so that they can be grouped together * properly. * When using the client side event reporting with JavaScript pixel and Google @@ -125,7 +125,7 @@ public function getPageviewId() * A unique ID of a web page view. * This should be kept the same for all user events triggered from the same * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should + * events as the user is browsing the page. The `pageview_id` property should * be kept the same for all these events so that they can be grouped together * properly. * When using the client side event reporting with JavaScript pixel and Google @@ -150,9 +150,9 @@ public function setPageviewId($var) * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string page_category = 2; * @return string @@ -169,9 +169,9 @@ public function getPageCategory() * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". + * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string page_category = 2; * @param string $var diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php b/DiscoveryEngine/src/V1beta/Reply.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply.php rename to DiscoveryEngine/src/V1beta/Reply.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php b/DiscoveryEngine/src/V1beta/Reply/Reference.php similarity index 95% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php rename to DiscoveryEngine/src/V1beta/Reply/Reference.php index bdadbc337035..6c8483239ec2 100644 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Reply/Reference.php +++ b/DiscoveryEngine/src/V1beta/Reply/Reference.php @@ -167,6 +167,4 @@ public function setEnd($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reference::class, \Google\Cloud\DiscoveryEngine\V1beta\Reply_Reference::class); diff --git a/DiscoveryEngine/src/V1beta/SearchInfo.php b/DiscoveryEngine/src/V1beta/SearchInfo.php index e53353b2a2c2..0c701aeeff2a 100644 --- a/DiscoveryEngine/src/V1beta/SearchInfo.php +++ b/DiscoveryEngine/src/V1beta/SearchInfo.php @@ -21,13 +21,13 @@ class SearchInfo extends \Google\Protobuf\Internal\Message * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] * for definition. * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * At least one of * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] * or * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string search_query = 1; */ @@ -38,9 +38,9 @@ class SearchInfo extends \Google\Protobuf\Internal\Message * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] * for definition and syntax. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string order_by = 2; */ @@ -51,9 +51,9 @@ class SearchInfo extends \Google\Protobuf\Internal\Message * See * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field optional int32 offset = 3; */ @@ -71,31 +71,31 @@ class SearchInfo extends \Google\Protobuf\Internal\Message * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] * for definition. * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * At least one of * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] * or * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type string $order_by * The order in which products are returned, if applicable. * See * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] * for definition and syntax. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type int $offset * An integer that specifies the current offset for pagination (the 0-indexed * starting location, amongst the products deemed by the API as relevant). * See * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * } */ public function __construct($data = NULL) { @@ -109,13 +109,13 @@ public function __construct($data = NULL) { * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] * for definition. * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * At least one of * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] * or * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string search_query = 1; * @return string @@ -131,13 +131,13 @@ public function getSearchQuery() * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] * for definition. * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * At least one of * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] * or * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. + * field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string search_query = 1; * @param string $var @@ -157,9 +157,9 @@ public function setSearchQuery($var) * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] * for definition and syntax. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string order_by = 2; * @return string @@ -175,9 +175,9 @@ public function getOrderBy() * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] * for definition and syntax. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string order_by = 2; * @param string $var @@ -197,9 +197,9 @@ public function setOrderBy($var) * See * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field optional int32 offset = 3; * @return int @@ -225,9 +225,9 @@ public function clearOffset() * See * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. + * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field optional int32 offset = 3; * @param int $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest.php b/DiscoveryEngine/src/V1beta/SearchRequest.php index 1cd48bf6dfdc..2ba13d5cf0eb 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest.php @@ -41,10 +41,16 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string query = 3; */ protected $query = ''; + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + protected $image_query = null; /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 will be coerced to 100. + * allowed value is 100. Values above 100 are coerced to 100. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; @@ -84,19 +90,20 @@ class SearchRequest extends \Google\Protobuf\Internal\Message */ protected $filter = ''; /** - * The order in which documents are returned. Document can be ordered by + * The order in which documents are returned. Documents can be ordered by * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. OrderBy expression is + * object. Leave it unset if ordered by relevance. `order_by` expression is * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field string order_by = 8; */ protected $order_by = ''; /** * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ @@ -129,14 +136,14 @@ class SearchRequest extends \Google\Protobuf\Internal\Message private $params; /** * The query expansion specification that specifies the conditions under which - * query expansion will occur. + * query expansion occurs. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; */ protected $query_expansion_spec = null; /** * The spell correction specification that specifies the mode under - * which spell correction will take effect. + * which spell correction takes effect. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; */ @@ -158,15 +165,14 @@ class SearchRequest extends \Google\Protobuf\Internal\Message */ protected $user_pseudo_id = ''; /** - * The content search spec that configs the desired behavior of content - * search. + * A specification for configuring the behavior of content search. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; */ protected $content_search_spec = null; /** * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. + * website search. * * Generated from protobuf field bool safe_search = 20; */ @@ -210,10 +216,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * documents under the default branch. * @type string $query * Raw search query. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $image_query + * Raw image query. * @type int $page_size * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 will be coerced to 100. + * allowed value is 100. Values above 100 are coerced to 100. * If this field is negative, an `INVALID_ARGUMENT` is returned. * @type string $page_token * A page token received from a previous @@ -237,15 +245,16 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * expression is case-sensitive. * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. * @type string $order_by - * The order in which documents are returned. Document can be ordered by + * The order in which documents are returned. Documents can be ordered by * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. OrderBy expression is + * object. Leave it unset if ordered by relevance. `order_by` expression is * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. * @type \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $user_info * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec>|\Google\Protobuf\Internal\RepeatedField $facet_specs * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` @@ -262,10 +271,10 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * which enables image searching. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $query_expansion_spec * The query expansion specification that specifies the conditions under which - * query expansion will occur. + * query expansion occurs. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $spell_correction_spec * The spell correction specification that specifies the mode under - * which spell correction will take effect. + * which spell correction takes effect. * @type string $user_pseudo_id * A unique identifier for tracking visitors. For example, this could be * implemented with an HTTP cookie, which should be able to uniquely identify @@ -279,11 +288,10 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $content_search_spec - * The content search spec that configs the desired behavior of content - * search. + * A specification for configuring the behavior of content search. * @type bool $safe_search * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. + * website search. * @type array|\Google\Protobuf\Internal\MapField $user_labels * The user labels applied to a resource must meet the following requirements: * * Each resource can have multiple labels, up to a maximum of 64. @@ -397,10 +405,46 @@ public function setQuery($var) return $this; } + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery|null + */ + public function getImageQuery() + { + return $this->image_query; + } + + public function hasImageQuery() + { + return isset($this->image_query); + } + + public function clearImageQuery() + { + unset($this->image_query); + } + + /** + * Raw image query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $var + * @return $this + */ + public function setImageQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery::class); + $this->image_query = $var; + + return $this; + } + /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 will be coerced to 100. + * allowed value is 100. Values above 100 are coerced to 100. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; @@ -414,7 +458,7 @@ public function getPageSize() /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 will be coerced to 100. + * allowed value is 100. Values above 100 are coerced to 100. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; @@ -538,11 +582,11 @@ public function setFilter($var) } /** - * The order in which documents are returned. Document can be ordered by + * The order in which documents are returned. Documents can be ordered by * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. OrderBy expression is + * object. Leave it unset if ordered by relevance. `order_by` expression is * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field string order_by = 8; * @return string @@ -553,11 +597,11 @@ public function getOrderBy() } /** - * The order in which documents are returned. Document can be ordered by + * The order in which documents are returned. Documents can be ordered by * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. OrderBy expression is + * object. Leave it unset if ordered by relevance. `order_by` expression is * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field string order_by = 8; * @param string $var @@ -573,8 +617,9 @@ public function setOrderBy($var) /** * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; * @return \Google\Cloud\DiscoveryEngine\V1beta\UserInfo|null @@ -596,8 +641,9 @@ public function clearUserInfo() /** * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. + * Highly recommended for analytics. + * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + * is used to deduce `device_type` for analytics. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; * @param \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $var @@ -717,7 +763,7 @@ public function setParams($var) /** * The query expansion specification that specifies the conditions under which - * query expansion will occur. + * query expansion occurs. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec|null @@ -739,7 +785,7 @@ public function clearQueryExpansionSpec() /** * The query expansion specification that specifies the conditions under which - * query expansion will occur. + * query expansion occurs. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $var @@ -755,7 +801,7 @@ public function setQueryExpansionSpec($var) /** * The spell correction specification that specifies the mode under - * which spell correction will take effect. + * which spell correction takes effect. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec|null @@ -777,7 +823,7 @@ public function clearSpellCorrectionSpec() /** * The spell correction specification that specifies the mode under - * which spell correction will take effect. + * which spell correction takes effect. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $var @@ -838,8 +884,7 @@ public function setUserPseudoId($var) } /** - * The content search spec that configs the desired behavior of content - * search. + * A specification for configuring the behavior of content search. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec|null @@ -860,8 +905,7 @@ public function clearContentSearchSpec() } /** - * The content search spec that configs the desired behavior of content - * search. + * A specification for configuring the behavior of content search. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $var @@ -877,7 +921,7 @@ public function setContentSearchSpec($var) /** * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. + * website search. * * Generated from protobuf field bool safe_search = 20; * @return bool @@ -889,7 +933,7 @@ public function getSafeSearch() /** * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. + * website search. * * Generated from protobuf field bool safe_search = 20; * @param bool $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec.php index f201ae05e1a4..41e55b536f8d 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec.php @@ -9,22 +9,21 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The specification that configs the desired behavior of the UCS content - * search. + * A specification for configuring the behavior of content search. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec */ class ContentSearchSpec extends \Google\Protobuf\Internal\Message { /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. + * If `snippetSpec` is not specified, snippets are not included in the + * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; */ protected $snippet_spec = null; /** - * If there is no summary spec provided, there will be no summary in the + * If `summarySpec` is not specified, summaries are not included in the * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; @@ -45,10 +44,10 @@ class ContentSearchSpec extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $snippet_spec - * If there is no snippet spec provided, there will be no snippet in the - * search result. + * If `snippetSpec` is not specified, snippets are not included in the + * search response. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec $summary_spec - * If there is no summary spec provided, there will be no summary in the + * If `summarySpec` is not specified, summaries are not included in the * search response. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $extractive_content_spec * If there is no extractive_content_spec provided, there will be no @@ -61,8 +60,8 @@ public function __construct($data = NULL) { } /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. + * If `snippetSpec` is not specified, snippets are not included in the + * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec|null @@ -83,8 +82,8 @@ public function clearSnippetSpec() } /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. + * If `snippetSpec` is not specified, snippets are not included in the + * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $var @@ -99,7 +98,7 @@ public function setSnippetSpec($var) } /** - * If there is no summary spec provided, there will be no summary in the + * If `summarySpec` is not specified, summaries are not included in the * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; @@ -121,7 +120,7 @@ public function clearSummarySpec() } /** - * If there is no summary spec provided, there will be no summary in the + * If `summarySpec` is not specified, summaries are not included in the * search response. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php index 22a2dc98508d..5d47755b04a6 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php @@ -9,35 +9,46 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The specification that configs the extractive content in search results. + * A specification for configuring the extractive content in a search + * response. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec */ class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message { /** - * The max number of extractive answers returned in each search result. + * The maximum number of extractive answers returned in each search + * result. * An extractive answer is a verbatim answer extracted from the original - * document, which provides precise and contextually relevant answer to + * document, which provides a precise and contextually relevant answer to * the search query. * If the number of matching answers is less than the - * extractive_answer_count, return all of the answers; otherwise, return - * the extractive_answer_count. - * At most 5 answers will be returned for each SearchResult. + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_answer_count = 1; */ protected $max_extractive_answer_count = 0; /** * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. * An extractive segment is a text segment extracted from the original - * document which is relevant to the search query and in general more - * verbose than an extrative answer. The segment could then be used as + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than the - * max_extractive_segment_count, return all of the segments; otherwise, - * return the max_extractive_segment_count. - * Currently one segment will be returned for each SearchResult. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_segment_count = 2; */ @@ -50,24 +61,34 @@ class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $max_extractive_answer_count - * The max number of extractive answers returned in each search result. + * The maximum number of extractive answers returned in each search + * result. * An extractive answer is a verbatim answer extracted from the original - * document, which provides precise and contextually relevant answer to + * document, which provides a precise and contextually relevant answer to * the search query. * If the number of matching answers is less than the - * extractive_answer_count, return all of the answers; otherwise, return - * the extractive_answer_count. - * At most 5 answers will be returned for each SearchResult. + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * @type int $max_extractive_segment_count * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. * An extractive segment is a text segment extracted from the original - * document which is relevant to the search query and in general more - * verbose than an extrative answer. The segment could then be used as + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than the - * max_extractive_segment_count, return all of the segments; otherwise, - * return the max_extractive_segment_count. - * Currently one segment will be returned for each SearchResult. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * } */ public function __construct($data = NULL) { @@ -76,14 +97,16 @@ public function __construct($data = NULL) { } /** - * The max number of extractive answers returned in each search result. + * The maximum number of extractive answers returned in each search + * result. * An extractive answer is a verbatim answer extracted from the original - * document, which provides precise and contextually relevant answer to + * document, which provides a precise and contextually relevant answer to * the search query. * If the number of matching answers is less than the - * extractive_answer_count, return all of the answers; otherwise, return - * the extractive_answer_count. - * At most 5 answers will be returned for each SearchResult. + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_answer_count = 1; * @return int @@ -94,14 +117,16 @@ public function getMaxExtractiveAnswerCount() } /** - * The max number of extractive answers returned in each search result. + * The maximum number of extractive answers returned in each search + * result. * An extractive answer is a verbatim answer extracted from the original - * document, which provides precise and contextually relevant answer to + * document, which provides a precise and contextually relevant answer to * the search query. * If the number of matching answers is less than the - * extractive_answer_count, return all of the answers; otherwise, return - * the extractive_answer_count. - * At most 5 answers will be returned for each SearchResult. + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most one answer is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_answer_count = 1; * @param int $var @@ -117,14 +142,22 @@ public function setMaxExtractiveAnswerCount($var) /** * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. * An extractive segment is a text segment extracted from the original - * document which is relevant to the search query and in general more - * verbose than an extrative answer. The segment could then be used as + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than the - * max_extractive_segment_count, return all of the segments; otherwise, - * return the max_extractive_segment_count. - * Currently one segment will be returned for each SearchResult. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_segment_count = 2; * @return int @@ -136,14 +169,22 @@ public function getMaxExtractiveSegmentCount() /** * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. * An extractive segment is a text segment extracted from the original - * document which is relevant to the search query and in general more - * verbose than an extrative answer. The segment could then be used as + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than the - * max_extractive_segment_count, return all of the segments; otherwise, - * return the max_extractive_segment_count. - * Currently one segment will be returned for each SearchResult. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * Currently one segment is returned for each + * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. * * Generated from protobuf field int32 max_extractive_segment_count = 2; * @param int $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php index e6dd9572d2a7..09922ff3efc3 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php @@ -9,29 +9,37 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The specification that configs the snippet in the search results. + * A specification for configuring snippets in a search response. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec */ class SnippetSpec extends \Google\Protobuf\Internal\Message { /** - * Max number of snippets returned in each search result. - * A snippet is an infomartive summary of a content with highlighting for - * UI rendering. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. * - * Generated from protobuf field int32 max_snippet_count = 1; + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; + * @deprecated */ protected $max_snippet_count = 0; /** - * if true, only snippet reference is returned. + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. * - * Generated from protobuf field bool reference_only = 2; + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; + * @deprecated */ protected $reference_only = false; + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + */ + protected $return_snippet = false; /** * Constructor. @@ -40,14 +48,16 @@ class SnippetSpec extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $max_snippet_count - * Max number of snippets returned in each search result. - * A snippet is an infomartive summary of a content with highlighting for - * UI rendering. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. * @type bool $reference_only - * if true, only snippet reference is returned. + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. + * @type bool $return_snippet + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. * } */ public function __construct($data = NULL) { @@ -56,35 +66,33 @@ public function __construct($data = NULL) { } /** - * Max number of snippets returned in each search result. - * A snippet is an infomartive summary of a content with highlighting for - * UI rendering. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. * - * Generated from protobuf field int32 max_snippet_count = 1; + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; * @return int + * @deprecated */ public function getMaxSnippetCount() { + @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); return $this->max_snippet_count; } /** - * Max number of snippets returned in each search result. - * A snippet is an infomartive summary of a content with highlighting for - * UI rendering. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. + * [DEPRECATED] This field is deprecated. To control snippet return, use + * `return_snippet` field. For backwards compatibility, we will return + * snippet if max_snippet_count > 0. * - * Generated from protobuf field int32 max_snippet_count = 1; + * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; * @param int $var * @return $this + * @deprecated */ public function setMaxSnippetCount($var) { + @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); GPBUtil::checkInt32($var); $this->max_snippet_count = $var; @@ -92,31 +100,67 @@ public function setMaxSnippetCount($var) } /** - * if true, only snippet reference is returned. + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. * - * Generated from protobuf field bool reference_only = 2; + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; * @return bool + * @deprecated */ public function getReferenceOnly() { + @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); return $this->reference_only; } /** - * if true, only snippet reference is returned. + * [DEPRECATED] This field is deprecated and will have no affect on the + * snippet. * - * Generated from protobuf field bool reference_only = 2; + * Generated from protobuf field bool reference_only = 2 [deprecated = true]; * @param bool $var * @return $this + * @deprecated */ public function setReferenceOnly($var) { + @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); GPBUtil::checkBool($var); $this->reference_only = $var; return $this; } + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + * @return bool + */ + public function getReturnSnippet() + { + return $this->return_snippet; + } + + /** + * If `true`, then return snippet. If no snippet can be generated, we + * return "No snippet is available for this page." A `snippet_status` with + * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + * + * Generated from protobuf field bool return_snippet = 3; + * @param bool $var + * @return $this + */ + public function setReturnSnippet($var) + { + GPBUtil::checkBool($var); + $this->return_snippet = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php index 5d16576b9e69..3608a14d4526 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php @@ -9,22 +9,69 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The specification that configs the summary in the search response. + * A specification for configuring a summary returned in a search + * response. * * Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec */ class SummarySpec extends \Google\Protobuf\Internal\Message { /** - * The number of top results the summary should be generated from. - * If the number of returned results is less than summary_result_count, - * then the summary would be derived from all the results; otherwise, the - * summary would be derived from the top results. - * At most 5 results can be used for generating summary. + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. * * Generated from protobuf field int32 summary_result_count = 1; */ protected $summary_result_count = 0; + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + */ + protected $include_citations = false; + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + */ + protected $ignore_adversarial_query = false; + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + */ + protected $ignore_non_summary_seeking_query = false; /** * Constructor. @@ -33,11 +80,45 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $summary_result_count - * The number of top results the summary should be generated from. - * If the number of returned results is less than summary_result_count, - * then the summary would be derived from all the results; otherwise, the - * summary would be derived from the top results. - * At most 5 results can be used for generating summary. + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. + * @type bool $include_citations + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * @type bool $ignore_adversarial_query + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * @type bool $ignore_non_summary_seeking_query + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. * } */ public function __construct($data = NULL) { @@ -46,11 +127,10 @@ public function __construct($data = NULL) { } /** - * The number of top results the summary should be generated from. - * If the number of returned results is less than summary_result_count, - * then the summary would be derived from all the results; otherwise, the - * summary would be derived from the top results. - * At most 5 results can be used for generating summary. + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. * * Generated from protobuf field int32 summary_result_count = 1; * @return int @@ -61,11 +141,10 @@ public function getSummaryResultCount() } /** - * The number of top results the summary should be generated from. - * If the number of returned results is less than summary_result_count, - * then the summary would be derived from all the results; otherwise, the - * summary would be derived from the top results. - * At most 5 results can be used for generating summary. + * The number of top results to generate the summary from. If the number + * of results returned is less than `summaryResultCount`, the summary is + * generated from all of the results. + * At most five results can be used to generate a summary. * * Generated from protobuf field int32 summary_result_count = 1; * @param int $var @@ -79,6 +158,142 @@ public function setSummaryResultCount($var) return $this; } + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + * @return bool + */ + public function getIncludeCitations() + { + return $this->include_citations; + } + + /** + * Specifies whether to include citations in the summary. The default + * value is `false`. + * When this field is set to `true`, summaries include in-line citation + * numbers. + * Example summary including citations: + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + * + * Generated from protobuf field bool include_citations = 2; + * @param bool $var + * @return $this + */ + public function setIncludeCitations($var) + { + GPBUtil::checkBool($var); + $this->include_citations = $var; + + return $this; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + * @return bool + */ + public function getIgnoreAdversarialQuery() + { + return $this->ignore_adversarial_query; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No summary is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating summaries for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 3; + * @param bool $var + * @return $this + */ + public function setIgnoreAdversarialQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_adversarial_query = $var; + + return $this; + } + + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + * @return bool + */ + public function getIgnoreNonSummarySeekingQuery() + { + return $this->ignore_non_summary_seeking_query; + } + + /** + * Specifies whether to filter out queries that are not summary-seeking. + * The default value is `false`. + * Google employs search-query classification to detect summary-seeking + * queries. No summary is returned if the search query is classified as a + * non-summary seeking query. For example, `why is the sky blue` and `Who + * is the best soccer player in the world?` are summary-seeking queries, + * but `SFO airport` and `world cup 2026` are not. They are most likely + * navigational queries. If this field is set to `true`, we skip + * generating summaries for non-summary seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; + * @param bool $var + * @return $this + */ + public function setIgnoreNonSummarySeekingQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_non_summary_seeking_query = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec.php index 55a24f30cd6e..b9bccac24e5e 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec.php @@ -24,7 +24,7 @@ class FacetSpec extends \Google\Protobuf\Internal\Message /** * Maximum of facet values that should be returned for this facet. If * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 will be coerced to 300. + * above 300 are coerced to 300. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 limit = 2; @@ -60,26 +60,26 @@ class FacetSpec extends \Google\Protobuf\Internal\Message /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. - * It will be ordered together with dynamic facets if dynamic - * facets is enabled. If set to false, the position of this facet in the - * response will be the same as in the request, and it will be ranked before + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before * the facets with dynamic position enable and all dynamic facets. * For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response will be determined + * that the position of rating facet in response is determined * automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * * "price", enable_dynamic_position = false * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enable, which will generate a facet - * 'gender'. Then the final order of the facets in the response can be + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" will always be - * ranked at 1st and 2nd position since their enable_dynamic_position are - * false. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. * * Generated from protobuf field bool enable_dynamic_position = 4; */ @@ -96,7 +96,7 @@ class FacetSpec extends \Google\Protobuf\Internal\Message * @type int $limit * Maximum of facet values that should be returned for this facet. If * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 will be coerced to 300. + * above 300 are coerced to 300. * If this field is negative, an `INVALID_ARGUMENT` is returned. * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_filter_keys * List of keys to exclude when faceting. @@ -124,26 +124,26 @@ class FacetSpec extends \Google\Protobuf\Internal\Message * @type bool $enable_dynamic_position * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. - * It will be ordered together with dynamic facets if dynamic - * facets is enabled. If set to false, the position of this facet in the - * response will be the same as in the request, and it will be ranked before + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before * the facets with dynamic position enable and all dynamic facets. * For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response will be determined + * that the position of rating facet in response is determined * automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * * "price", enable_dynamic_position = false * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enable, which will generate a facet - * 'gender'. Then the final order of the facets in the response can be + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" will always be - * ranked at 1st and 2nd position since their enable_dynamic_position are - * false. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. * } */ public function __construct($data = NULL) { @@ -190,7 +190,7 @@ public function setFacetKey($var) /** * Maximum of facet values that should be returned for this facet. If * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 will be coerced to 300. + * above 300 are coerced to 300. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 limit = 2; @@ -204,7 +204,7 @@ public function getLimit() /** * Maximum of facet values that should be returned for this facet. If * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 will be coerced to 300. + * above 300 are coerced to 300. * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 limit = 2; @@ -290,26 +290,26 @@ public function setExcludedFilterKeys($var) /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. - * It will be ordered together with dynamic facets if dynamic - * facets is enabled. If set to false, the position of this facet in the - * response will be the same as in the request, and it will be ranked before + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before * the facets with dynamic position enable and all dynamic facets. * For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response will be determined + * that the position of rating facet in response is determined * automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * * "price", enable_dynamic_position = false * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enable, which will generate a facet - * 'gender'. Then the final order of the facets in the response can be + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" will always be - * ranked at 1st and 2nd position since their enable_dynamic_position are - * false. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. * * Generated from protobuf field bool enable_dynamic_position = 4; * @return bool @@ -322,26 +322,26 @@ public function getEnableDynamicPosition() /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. - * It will be ordered together with dynamic facets if dynamic - * facets is enabled. If set to false, the position of this facet in the - * response will be the same as in the request, and it will be ranked before + * If dynamic facets are enabled, it is ordered together. + * If set to false, the position of this facet in the + * response is the same as in the request, and it is ranked before * the facets with dynamic position enable and all dynamic facets. * For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response will be determined + * that the position of rating facet in response is determined * automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * * "price", enable_dynamic_position = false * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enable, which will generate a facet - * 'gender'. Then the final order of the facets in the response can be + * And also you have a dynamic facets enabled, which generates a facet + * `gender`. Then the final order of the facets in the response can be * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" will always be - * ranked at 1st and 2nd position since their enable_dynamic_position are - * false. + * However, notice that "price" and "brands" are always + * ranked at first and second position because their enable_dynamic_position + * is false. * * Generated from protobuf field bool enable_dynamic_position = 4; * @param bool $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec/FacetKey.php b/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec/FacetKey.php index 2d5c50382fe2..2c22cd2d327a 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec/FacetKey.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/FacetSpec/FacetKey.php @@ -24,7 +24,7 @@ class FacetKey extends \Google\Protobuf\Internal\Message */ protected $key = ''; /** - * Set only if values should be bucketized into intervals. Must be set + * Set only if values should be bucketed into intervals. Must be set * for facets with numerical values. Must not be set for facet with text * values. Maximum number of intervals is 30. * @@ -35,8 +35,8 @@ class FacetKey extends \Google\Protobuf\Internal\Message * Only get facet for the given restricted values. Only supported on * textual fields. For example, suppose "category" has three values * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet will only - * contain "Action > 2022". Only supported on textual fields. Maximum + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum * is 10. * * Generated from protobuf field repeated string restricted_values = 3; @@ -46,7 +46,7 @@ class FacetKey extends \Google\Protobuf\Internal\Message * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet will only contain "Action > 2022" and "Action > 2021". + * "category" facet only contains "Action > 2022" and "Action > 2021". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string prefixes = 4; @@ -56,7 +56,7 @@ class FacetKey extends \Google\Protobuf\Internal\Message * Only get facet values that contains the given strings. For example, * suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022". + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string contains = 5; @@ -99,27 +99,27 @@ class FacetKey extends \Google\Protobuf\Internal\Message * [Document][google.cloud.discoveryengine.v1beta.Document] object, over * which the facet values are computed. Facet key is case-sensitive. * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Interval>|\Google\Protobuf\Internal\RepeatedField $intervals - * Set only if values should be bucketized into intervals. Must be set + * Set only if values should be bucketed into intervals. Must be set * for facets with numerical values. Must not be set for facet with text * values. Maximum number of intervals is 30. * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_values * Only get facet for the given restricted values. Only supported on * textual fields. For example, suppose "category" has three values * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet will only - * contain "Action > 2022". Only supported on textual fields. Maximum + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum * is 10. * @type array|\Google\Protobuf\Internal\RepeatedField $prefixes * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet will only contain "Action > 2022" and "Action > 2021". + * "category" facet only contains "Action > 2022" and "Action > 2021". * Only supported on textual fields. Maximum is 10. * @type array|\Google\Protobuf\Internal\RepeatedField $contains * Only get facet values that contains the given strings. For example, * suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022". + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". * Only supported on textual fields. Maximum is 10. * @type bool $case_insensitive * True to make facet keys case insensitive when getting faceting @@ -176,7 +176,7 @@ public function setKey($var) } /** - * Set only if values should be bucketized into intervals. Must be set + * Set only if values should be bucketed into intervals. Must be set * for facets with numerical values. Must not be set for facet with text * values. Maximum number of intervals is 30. * @@ -189,7 +189,7 @@ public function getIntervals() } /** - * Set only if values should be bucketized into intervals. Must be set + * Set only if values should be bucketed into intervals. Must be set * for facets with numerical values. Must not be set for facet with text * values. Maximum number of intervals is 30. * @@ -209,8 +209,8 @@ public function setIntervals($var) * Only get facet for the given restricted values. Only supported on * textual fields. For example, suppose "category" has three values * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet will only - * contain "Action > 2022". Only supported on textual fields. Maximum + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum * is 10. * * Generated from protobuf field repeated string restricted_values = 3; @@ -225,8 +225,8 @@ public function getRestrictedValues() * Only get facet for the given restricted values. Only supported on * textual fields. For example, suppose "category" has three values * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet will only - * contain "Action > 2022". Only supported on textual fields. Maximum + * "restricted_values" to "Action > 2022", the "category" facet only + * contains "Action > 2022". Only supported on textual fields. Maximum * is 10. * * Generated from protobuf field repeated string restricted_values = 3; @@ -245,7 +245,7 @@ public function setRestrictedValues($var) * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet will only contain "Action > 2022" and "Action > 2021". + * "category" facet only contains "Action > 2022" and "Action > 2021". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string prefixes = 4; @@ -260,7 +260,7 @@ public function getPrefixes() * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet will only contain "Action > 2022" and "Action > 2021". + * "category" facet only contains "Action > 2022" and "Action > 2021". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string prefixes = 4; @@ -279,7 +279,7 @@ public function setPrefixes($var) * Only get facet values that contains the given strings. For example, * suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022". + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string contains = 5; @@ -294,7 +294,7 @@ public function getContains() * Only get facet values that contains the given strings. For example, * suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022". + * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". * Only supported on textual fields. Maximum is 10. * * Generated from protobuf field repeated string contains = 5; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php b/DiscoveryEngine/src/V1beta/SearchRequest/ImageQuery.php similarity index 91% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php rename to DiscoveryEngine/src/V1beta/SearchRequest/ImageQuery.php index 2ffd4b329b9a..1c3e0cb3bfbe 100644 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ImageQuery.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ImageQuery.php @@ -76,6 +76,4 @@ public function getImage() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageQuery::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ImageQuery::class); diff --git a/DiscoveryEngine/src/V1beta/SearchResponse/GuidedSearchResult.php b/DiscoveryEngine/src/V1beta/SearchResponse/GuidedSearchResult.php index 125a8e66d8af..0b8c7017ddcc 100644 --- a/DiscoveryEngine/src/V1beta/SearchResponse/GuidedSearchResult.php +++ b/DiscoveryEngine/src/V1beta/SearchResponse/GuidedSearchResult.php @@ -22,6 +22,12 @@ class GuidedSearchResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; */ private $refinement_attributes; + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + */ + private $follow_up_questions; /** * Constructor. @@ -31,6 +37,8 @@ class GuidedSearchResult extends \Google\Protobuf\Internal\Message * * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute>|\Google\Protobuf\Internal\RepeatedField $refinement_attributes * A list of ranked refinement attributes. + * @type array|\Google\Protobuf\Internal\RepeatedField $follow_up_questions + * Suggested follow-up questions. * } */ public function __construct($data = NULL) { @@ -64,6 +72,32 @@ public function setRefinementAttributes($var) return $this; } + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFollowUpQuestions() + { + return $this->follow_up_questions; + } + + /** + * Suggested follow-up questions. + * + * Generated from protobuf field repeated string follow_up_questions = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFollowUpQuestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->follow_up_questions = $arr; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchResponse/Summary.php b/DiscoveryEngine/src/V1beta/SearchResponse/Summary.php index ca51cb45c3a1..0e0192067ee6 100644 --- a/DiscoveryEngine/src/V1beta/SearchResponse/Summary.php +++ b/DiscoveryEngine/src/V1beta/SearchResponse/Summary.php @@ -21,6 +21,13 @@ class Summary extends \Google\Protobuf\Internal\Message * Generated from protobuf field string summary_text = 1; */ protected $summary_text = ''; + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + */ + private $summary_skipped_reasons; /** * Constructor. @@ -30,6 +37,9 @@ class Summary extends \Google\Protobuf\Internal\Message * * @type string $summary_text * The summary content. + * @type array|\Google\Protobuf\Internal\RepeatedField $summary_skipped_reasons + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. * } */ public function __construct($data = NULL) { @@ -63,6 +73,34 @@ public function setSummaryText($var) return $this; } + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSummarySkippedReasons() + { + return $this->summary_skipped_reasons; + } + + /** + * Additional summary-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSummarySkippedReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\SummarySkippedReason::class); + $this->summary_skipped_reasons = $arr; + + return $this; + } + } diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/SummarySkippedReason.php similarity index 93% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php rename to DiscoveryEngine/src/V1beta/SearchResponse/Summary/SummarySkippedReason.php index a4e595d4fed7..dfe6e4c983b0 100644 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary/SummarySkippedReason.php +++ b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/SummarySkippedReason.php @@ -75,6 +75,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SummarySkippedReason::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Summary_SummarySkippedReason::class); diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php b/DiscoveryEngine/src/V1beta/TextInput.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TextInput.php rename to DiscoveryEngine/src/V1beta/TextInput.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php b/DiscoveryEngine/src/V1beta/UpdateConversationRequest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateConversationRequest.php rename to DiscoveryEngine/src/V1beta/UpdateConversationRequest.php diff --git a/DiscoveryEngine/src/V1beta/UserEvent.php b/DiscoveryEngine/src/V1beta/UserEvent.php index 8298838f99c1..80ed22beed6d 100644 --- a/DiscoveryEngine/src/V1beta/UserEvent.php +++ b/DiscoveryEngine/src/V1beta/UserEvent.php @@ -43,7 +43,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message * the event history of those users together, which results in degraded model * quality. * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) @@ -107,19 +107,19 @@ class UserEvent extends \Google\Protobuf\Internal\Message * This field enables accurate attribution of recommendation model * performance. * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; */ @@ -137,13 +137,14 @@ class UserEvent extends \Google\Protobuf\Internal\Message * directly from [RecommendationService.RecommendRequest.filter][] conforming * to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string filter = 9; */ protected $filter = ''; /** - * List of Documents associated with this user event. + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. * This field is optional except for the following event types: * * `view-item` * * `add-to-cart` @@ -168,14 +169,16 @@ class UserEvent extends \Google\Protobuf\Internal\Message */ protected $panel = null; /** - * Search API details related to the event. + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. * This field should be set for `search` event. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; */ protected $search_info = null; /** - * CompleteQuery API details related to the event. + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. * This field should be set for `search` event when autocomplete function is * enabled and the user clicks a suggestion for search. * @@ -222,7 +225,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message * 256 characters. * * For number attributes, at most 400 values are allowed. * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can + * `traffic_channel`, which is how a user arrives at the site. Users can * arrive * at the site by coming to the site directly, coming through Google * search, or in other ways. @@ -266,7 +269,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message * the event history of those users together, which results in degraded model * quality. * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) @@ -306,19 +309,19 @@ class UserEvent extends \Google\Protobuf\Internal\Message * This field enables accurate attribution of recommendation model * performance. * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. * @type string $filter * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. @@ -332,9 +335,10 @@ class UserEvent extends \Google\Protobuf\Internal\Message * directly from [RecommendationService.RecommendRequest.filter][] conforming * to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type array<\Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents - * List of Documents associated with this user event. + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. * This field is optional except for the following event types: * * `view-item` * * `add-to-cart` @@ -351,10 +355,12 @@ class UserEvent extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo $panel * Panel metadata associated with this user event. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo $search_info - * Search API details related to the event. + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. * This field should be set for `search` event. * @type \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo $completion_info - * CompleteQuery API details related to the event. + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. * This field should be set for `search` event when autocomplete function is * enabled and the user clicks a suggestion for search. * @type \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo $transaction_info @@ -385,7 +391,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message * 256 characters. * * For number attributes, at most 400 values are allowed. * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can + * `traffic_channel`, which is how a user arrives at the site. Users can * arrive * at the site by coming to the site directly, coming through Google * search, or in other ways. @@ -457,7 +463,7 @@ public function setEventType($var) * the event history of those users together, which results in degraded model * quality. * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) @@ -480,7 +486,7 @@ public function getUserPseudoId() * the event history of those users together, which results in degraded model * quality. * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * The field should not contain PII or user-data. We recommend to use Google * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) @@ -701,19 +707,19 @@ public function setPageInfo($var) * This field enables accurate attribution of recommendation model * performance. * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; * @return string @@ -730,19 +736,19 @@ public function getAttributionToken() * This field enables accurate attribution of recommendation model * performance. * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; * @param string $var @@ -769,7 +775,7 @@ public function setAttributionToken($var) * directly from [RecommendationService.RecommendRequest.filter][] conforming * to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string filter = 9; * @return string @@ -792,7 +798,7 @@ public function getFilter() * directly from [RecommendationService.RecommendRequest.filter][] conforming * to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * * Generated from protobuf field string filter = 9; * @param string $var @@ -807,7 +813,8 @@ public function setFilter($var) } /** - * List of Documents associated with this user event. + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. * This field is optional except for the following event types: * * `view-item` * * `add-to-cart` @@ -831,7 +838,8 @@ public function getDocuments() } /** - * List of Documents associated with this user event. + * List of [Document][google.cloud.discoveryengine.v1beta.Document]s + * associated with this user event. * This field is optional except for the following event types: * * `view-item` * * `add-to-cart` @@ -895,7 +903,8 @@ public function setPanel($var) } /** - * Search API details related to the event. + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. * This field should be set for `search` event. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; @@ -917,7 +926,8 @@ public function clearSearchInfo() } /** - * Search API details related to the event. + * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + * details related to the event. * This field should be set for `search` event. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; @@ -933,7 +943,8 @@ public function setSearchInfo($var) } /** - * CompleteQuery API details related to the event. + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. * This field should be set for `search` event when autocomplete function is * enabled and the user clicks a suggestion for search. * @@ -956,7 +967,8 @@ public function clearCompletionInfo() } /** - * CompleteQuery API details related to the event. + * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + * details related to the event. * This field should be set for `search` event when autocomplete function is * enabled and the user clicks a suggestion for search. * @@ -1085,7 +1097,7 @@ public function setPromotionIds($var) * 256 characters. * * For number attributes, at most 400 values are allowed. * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can + * `traffic_channel`, which is how a user arrives at the site. Users can * arrive * at the site by coming to the site directly, coming through Google * search, or in other ways. @@ -1117,7 +1129,7 @@ public function getAttributes() * 256 characters. * * For number attributes, at most 400 values are allowed. * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can + * `traffic_channel`, which is how a user arrives at the site. Users can * arrive * at the site by coming to the site directly, coming through Google * search, or in other ways. diff --git a/DiscoveryEngine/src/V1beta/UserInfo.php b/DiscoveryEngine/src/V1beta/UserInfo.php index 37a1b603b851..5684be976bb2 100644 --- a/DiscoveryEngine/src/V1beta/UserInfo.php +++ b/DiscoveryEngine/src/V1beta/UserInfo.php @@ -29,8 +29,7 @@ class UserInfo extends \Google\Protobuf\Internal\Message */ protected $user_id = ''; /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. + * User agent as included in the HTTP header. * The field must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This should not be set when using the client side event reporting with @@ -60,8 +59,7 @@ class UserInfo extends \Google\Protobuf\Internal\Message * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type string $user_agent - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. + * User agent as included in the HTTP header. * The field must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This should not be set when using the client side event reporting with @@ -118,8 +116,7 @@ public function setUserId($var) } /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. + * User agent as included in the HTTP header. * The field must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This should not be set when using the client side event reporting with @@ -138,8 +135,7 @@ public function getUserAgent() } /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. + * User agent as included in the HTTP header. * The field must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * This should not be set when using the client side event reporting with diff --git a/DiscoveryEngine/src/V1beta/gapic_metadata.json b/DiscoveryEngine/src/V1beta/gapic_metadata.json index 152941eb8b1a..2adac385f04a 100644 --- a/DiscoveryEngine/src/V1beta/gapic_metadata.json +++ b/DiscoveryEngine/src/V1beta/gapic_metadata.json @@ -19,6 +19,59 @@ } } }, + "SearchService": { + "clients": { + "grpc": { + "libraryClient": "SearchServiceGapicClient", + "rpcs": { + "Search": { + "methods": [ + "search" + ] + } + } + } + } + }, + "ConversationalSearchService": { + "clients": { + "grpc": { + "libraryClient": "ConversationalSearchServiceGapicClient", + "rpcs": { + "ConverseConversation": { + "methods": [ + "converseConversation" + ] + }, + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "ListConversations": { + "methods": [ + "listConversations" + ] + }, + "UpdateConversation": { + "methods": [ + "updateConversation" + ] + } + } + } + } + }, "DocumentService": { "clients": { "grpc": { @@ -111,20 +164,6 @@ } } }, - "SearchService": { - "clients": { - "grpc": { - "libraryClient": "SearchServiceGapicClient", - "rpcs": { - "Search": { - "methods": [ - "search" - ] - } - } - } - } - }, "UserEventService": { "clients": { "grpc": { diff --git a/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php index d63af46e6f44..ea503f4eecb8 100644 --- a/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php @@ -38,6 +38,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -83,10 +95,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_client_config.json rename to DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_descriptor_config.php rename to DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/conversational_search_service_rest_client_config.php rename to DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php diff --git a/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php index ca1c26fdfb25..8427f0f2e1e1 100644 --- a/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php @@ -155,6 +155,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -200,10 +212,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php index defe0aecb12a..b7d7dfd1bf0d 100644 --- a/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php @@ -40,6 +40,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -85,10 +97,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php index 41b54e8df44d..edb36e463bc5 100644 --- a/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php @@ -117,6 +117,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -162,10 +174,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php index b82e9217938b..70b3ee95a49a 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php @@ -40,6 +40,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -85,10 +97,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php index 8028a9e96577..e204c5c30a2b 100644 --- a/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php @@ -76,6 +76,18 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', @@ -121,10 +133,22 @@ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', diff --git a/DiscoveryEngine/tests/Unit/V1beta/Client/CompletionServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/CompletionServiceClientTest.php index be6f186e5a2a..9580255c41b0 100644 --- a/DiscoveryEngine/tests/Unit/V1beta/Client/CompletionServiceClientTest.php +++ b/DiscoveryEngine/tests/Unit/V1beta/Client/CompletionServiceClientTest.php @@ -69,7 +69,9 @@ public function completeQueryTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $tailMatchTriggered = true; $expectedResponse = new CompleteQueryResponse(); + $expectedResponse->setTailMatchTriggered($tailMatchTriggered); $transport->addResponse($expectedResponse); // Mock request $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); @@ -137,7 +139,9 @@ public function completeQueryAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $tailMatchTriggered = true; $expectedResponse = new CompleteQueryResponse(); + $expectedResponse->setTailMatchTriggered($tailMatchTriggered); $transport->addResponse($expectedResponse); // Mock request $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php similarity index 100% rename from owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php rename to DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php deleted file mode 100644 index 928101577619..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Common.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - ' -� -,google/cloud/discoveryengine/v1/common.protogoogle.cloud.discoveryengine.v1"0 -CustomAttribute -text (  -numbers ("/ -UserInfo -user_id (  - -user_agent ( B� -#com.google.cloud.discoveryengine.v1B CommonProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1�A� -%discoveryengine.googleapis.com/BranchQprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}�A� -(discoveryengine.googleapis.com/DataStore?projects/{project}/locations/{location}/dataStores/{data_store}Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}�A� -,discoveryengine.googleapis.com/ServingConfig_projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php deleted file mode 100644 index 805cebeb3268..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/CompletionService.php +++ /dev/null @@ -1,45 +0,0 @@ -internalAddGeneratedFile( - ' -� -8google/cloud/discoveryengine/v1/completion_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"� -CompleteQueryRequestD - -data_store ( B0�A�A* -(discoveryengine.googleapis.com/DataStore -query ( B�A - query_model (  -user_pseudo_id ( "� -CompleteQueryResponsea -query_suggestions ( 2F.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion% -QuerySuggestion - -suggestion ( 2� -CompletionService� - CompleteQuery5.google.cloud.discoveryengine.v1.CompleteQueryRequest6.google.cloud.discoveryengine.v1.CompleteQueryResponse"�����B/v1/{data_store=projects/*/locations/*/dataStores/*}:completeQueryZRP/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQueryR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -#com.google.cloud.discoveryengine.v1BCompletionServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Document.php deleted file mode 100644 index c703f467db497752085b99d3c5020ae3ce7a9a9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1797 zcmbtV-D(p-6t+qKGPRVh7setuYN09UF3~HuR%x0Ti`a%%3d%y5%udoNo1JBLHd0H_ zHxRt=0lX1>6raLtpTaXcyGehsVsAQo_RM$A_nos}o<5HbB6J@&S;!<&%*UN0tPU8C zq)>v20C$pZmq|=TKjHzCHpcZGyuI@VH|kq&?!whrB$6^0_k`#L%%Ooue8=Z86$2)Z zSlHtsa|Tt%7c}X!P}wOoLLuq1I3kqcW~=s^DdH1Fyk?5xZE6&+ej3HwudX3P0}{u$ zo}r;*gyAnrIsvCRRz$(SWgfSA$Q366{{WoUahC)!gUjc0yGckD7a`Ucc0$T3tJq-b z+~r7s2J1NQtEFWDNxZF4F&UD;tFxF&9w{MPkm|ZUrbc4wNM$uEtKoPTS4@wtd#=fK ztYpGYR>xQ}mB?@{?OOv3M{a?0?%O>yF8{)7`Vr?4CWSF5SuiNyHtQ zu{3+QbUS;MZY50CiBl@(?Y+-aXf|Ip%SLnNWm~Umc@j@l<{sV5nl%>yz&2XEyk^}% zrNdZ+CVL99OAuT{lX~;Z6Z*MU{IxMW|T zg23FPYF_s;(stgry=g95OUR0d1c-M2Eo%Ik6#ogj;WNnx%x|CMIGxtIjH7P9xbzCm zk)u$15ZAcwpS~gxOwdv}vZX!yy_X F^atCVSfT&` diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php deleted file mode 100644 index dae3ac3c9423..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/DocumentService.php +++ /dev/null @@ -1,69 +0,0 @@ -internalAddGeneratedFile( - ' -� -6google/cloud/discoveryengine/v1/document_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto.google/cloud/discoveryengine/v1/document.proto3google/cloud/discoveryengine/v1/import_config.proto2google/cloud/discoveryengine/v1/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S -GetDocumentRequest= -name ( B/�A�A) -\'discoveryengine.googleapis.com/Document"| -ListDocumentsRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/Branch - page_size ( - -page_token ( "n -ListDocumentsResponse< - documents ( 2).google.cloud.discoveryengine.v1.Document -next_page_token ( "� -CreateDocumentRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/Branch@ -document ( 2).google.cloud.discoveryengine.v1.DocumentB�A - document_id ( B�A"p -UpdateDocumentRequest@ -document ( 2).google.cloud.discoveryengine.v1.DocumentB�A - allow_missing ("V -DeleteDocumentRequest= -name ( B/�A�A) -\'discoveryengine.googleapis.com/Document2� -DocumentService� - GetDocument3.google.cloud.discoveryengine.v1.GetDocumentRequest).google.cloud.discoveryengine.v1.Document"�����E/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZUS/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� - ListDocuments5.google.cloud.discoveryengine.v1.ListDocumentsRequest6.google.cloud.discoveryengine.v1.ListDocumentsResponse"�����E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZUS/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents�Aparent� -CreateDocument6.google.cloud.discoveryengine.v1.CreateDocumentRequest).google.cloud.discoveryengine.v1.Document"�����"E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZ_"S/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:document�Aparent,document,document_id� -UpdateDocument6.google.cloud.discoveryengine.v1.UpdateDocumentRequest).google.cloud.discoveryengine.v1.Document"�����2N/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZh2\\/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document� -DeleteDocument6.google.cloud.discoveryengine.v1.DeleteDocumentRequest.google.protobuf.Empty"�����*E/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZU*S/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� -ImportDocuments7.google.cloud.discoveryengine.v1.ImportDocumentsRequest.google.longrunning.Operation"�����"L/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Z_"Z/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*�Ar -7google.cloud.discoveryengine.v1.ImportDocumentsResponse7google.cloud.discoveryengine.v1.ImportDocumentsMetadata� -PurgeDocuments6.google.cloud.discoveryengine.v1.PurgeDocumentsRequest.google.longrunning.Operation"�����"K/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge:*Z^"Y/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge:*�Ap -6google.cloud.discoveryengine.v1.PurgeDocumentsResponse6google.cloud.discoveryengine.v1.PurgeDocumentsMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -#com.google.cloud.discoveryengine.v1BDocumentServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/ImportConfig.php deleted file mode 100644 index 75ae09dbf45d2cc5aefc94a77496d56c6e8fafbf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3815 zcmd5<-E!MR6t0~#6R(>lRY>E8VJh4*bqbXm_Xb=7^^cOelh~=_W(G!#MwZsjc4SHH zN*Myv8-{Bhf;;*QJOMlaw_NiG+`!pg$w_Rd4uKiSjWerrzCFL++4J$I!C`>zsN2}X z)C#eqc8}HY5UT<8L*MpYwHx(%n5wov2#AZRrmFRp+H7@Hz24}&3#!bIsEx~N-}n12 zF50diIYoys+dsne7<+x<;o{LokqiQ#hNkU%J<`_%K0=-~z$~zAtZwgBcX4PrR%jX9 z0?MdyD5HKB$~f3~jF9bGjHwL)Srdrp8>GTt5OrN*t1Pra__<4%Njwq~%OzifbDL_< zav27IaoJwv*&*>gl`FJ78yD79iOFT}20jF1Q%!8!YF;MMRyV?yLA0Wr1+ zcAY9dw2p{R%jFZVPC(96ZR0qp7uGs2RYu*nqXG89iyLq*)C-2Ge)PAnhFR(msI$-- z1Q)lX9oWV`lu^VkuG2XVuu+FTnyey<=)or>E}4qs3@c;{nyWC(DbMgd^ydnCbcwD~ zZc8Oiw4yfBirUe}+N~JX3P_R0xt1NdrcJxhi4z*jKb$5XLDo#n(-v#Q))fTo#ncyl= zW#4oN&CLp+5sT-9N)}~?=H)*`HzWt@l=@T>q4E|&950}_N4}CaJ-t$00QaEz zd--o?(W+D(wiRpRFC!39Y_vc;7iim*G$3M?E$K-B&Z{f!96+rh&}4jt&k#9XS{dKK z!;vlBpL)YE&k0NmEp|yC?54+wwLEy)QgJHQ*}Nx!PtY917s^#euKEya=a0&LR2c0e zS&Yy^OoQQAgo3d4f&8)Z6kWqS9r37(%cnHep0P}>bvILV}b86tgNF2=>`MZba8T>lK27bsY!ku^O)CswsZ-PmABFIOCKuF zk(9w8h7qKKm&c6q4qA!4NuPPfXY#Knc#}LSlp@O76hqURoNh#Jv!#UXB#!_WX~Q|e z6{3K*zf_Pey-8sOEwIS8F*|EC9QQ2ZMij@sNMnCYCHq*nwe?-S*{SR-rIdLzyY*scXDNM(0lyz_LwNlDcLZ4d zE{*QMIGGlvYCQMl$QRGtz0~Ksvfbol5>u(~kF8=bv0xh;so0?VcHf6n`BOd%^}KB;}s-3cW(;FD1F{Pyhe` diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php deleted file mode 100644 index 9257bd60b630..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/PurgeConfig.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' -� -2google/cloud/discoveryengine/v1/purge_config.protogoogle.cloud.discoveryengine.v1google/api/resource.protogoogle/protobuf/timestamp.proto"z -PurgeDocumentsRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/Branch -filter ( B�A -force ("q -PurgeDocumentsResponse - purge_count (B - purge_sample ( B,�A) -\'discoveryengine.googleapis.com/Document"� -PurgeDocumentsMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp - success_count ( - failure_count (B� -#com.google.cloud.discoveryengine.v1BPurgeConfigProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/Schema.php deleted file mode 100644 index 08ef353e4790982e155db455f1f409d5419f3b0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1478 zcmb7E!EO^V5G5(Cz!gG7LX--rrY&kJm0bcimx7We4LP)lnko`#rO5F*iL32;WqTu) zYJY|!pTZw-O_nIwEf#W@WJ zETrzJc1FXr?d+I39yu~onnCt z0QDEey?_xY6;}GU$z+#>Ofej=&$^yH*vEmS`s%!IKMsjvJcQ;#GbFUQ4K1ee-Hf=d ze-DncY8gs29bO|;RD?M2s#FreBE>~ZyCO88YC@#36t}am29EV%(dLNIT#|cGiI`rE z4xykb7U6E1w*g2dEAJZ4$`SJp7!CXi9pVw=0-()b-&~ z4qv`w8DnMNpAdAQ+o?Dy$rQK+elLQZ|LLQ`n)PR=uI=HKJj@lBUq5lO;9~&CGV$R~;W1b~l{_5# zFKGY!+WZLIHGRL5GyBTIkMbh=mAfqe%z+oPsat5BwRH68xmhMH9qN=4CEbf`mAC;X zy776aZR2I)nrUk5zNFe})?H~fNj8MqXe&ty?6!zn3j!V42AXbeAF6T>EZL})KRK|W zs~Yon)8kc^ZP_g|c&*&0L+hBaZfF_sIi=B*X|b81GwSWmS-#{SRvYd8W~X-iv368% z9M!(&*XpSNIjI0S)v*B8QW0}HrEg;oFVm>0NLe3GtJGzF-NGQ0;vh5wgixo{ThhcU Z{$^`30XtR#t|-QhYLR-{nNC0gz+YW|`9J^w diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php deleted file mode 100644 index 14ff76787073..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SchemaService.php +++ /dev/null @@ -1,76 +0,0 @@ -internalAddGeneratedFile( - ' -� -4google/cloud/discoveryengine/v1/schema_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto,google/cloud/discoveryengine/v1/schema.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"O -GetSchemaRequest; -name ( B-�A�A\' -%discoveryengine.googleapis.com/Schema"} -ListSchemasRequest@ -parent ( B0�A�A* -(discoveryengine.googleapis.com/DataStore - page_size ( - -page_token ( "h -ListSchemasResponse8 -schemas ( 2\'.google.cloud.discoveryengine.v1.Schema -next_page_token ( "� -CreateSchemaRequest@ -parent ( B0�A�A* -(discoveryengine.googleapis.com/DataStore< -schema ( 2\'.google.cloud.discoveryengine.v1.SchemaB�A - schema_id ( B�A"j -UpdateSchemaRequest< -schema ( 2\'.google.cloud.discoveryengine.v1.SchemaB�A - allow_missing ("R -DeleteSchemaRequest; -name ( B-�A�A\' -%discoveryengine.googleapis.com/Schema"x -CreateSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp"x -UpdateSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp"x -DeleteSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp2� - SchemaService� - GetSchema1.google.cloud.discoveryengine.v1.GetSchemaRequest\'.google.cloud.discoveryengine.v1.Schema"�����8/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}ZHF/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}�Aname� - ListSchemas3.google.cloud.discoveryengine.v1.ListSchemasRequest4.google.cloud.discoveryengine.v1.ListSchemasResponse"�����8/v1/{parent=projects/*/locations/*/dataStores/*}/schemasZHF/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas�Aparent� - CreateSchema4.google.cloud.discoveryengine.v1.CreateSchemaRequest.google.longrunning.Operation"�����"8/v1/{parent=projects/*/locations/*/dataStores/*}/schemas:schemaZP"F/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas:schema�Aparent,schema,schema_id�A^ -&google.cloud.discoveryengine.v1.Schema4google.cloud.discoveryengine.v1.CreateSchemaMetadata� - UpdateSchema4.google.cloud.discoveryengine.v1.UpdateSchemaRequest.google.longrunning.Operation"�����2?/v1/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}:schemaZW2M/v1/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}:schema�A^ -&google.cloud.discoveryengine.v1.Schema4google.cloud.discoveryengine.v1.UpdateSchemaMetadata� - DeleteSchema4.google.cloud.discoveryengine.v1.DeleteSchemaRequest.google.longrunning.Operation"�����*8/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}ZH*F/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}�Aname�AM -google.protobuf.Empty4google.cloud.discoveryengine.v1.DeleteSchemaMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -#com.google.cloud.discoveryengine.v1BSchemaServiceProtoPZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�Google.Cloud.DiscoveryEngine.V1�Google\\Cloud\\DiscoveryEngine\\V1�"Google::Cloud::DiscoveryEngine::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/SearchService.php deleted file mode 100644 index 774cd8e7f13f46ef3ca712dcf7c287ff73d5c76d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3710 zcmbVP&2!sS5Xa6(<8_;~O4GU?h6=Zxrkz%vgdP~BDfL%9hQtnW6Q&(gjVwRgqOzXQ zdrBKRxiG_DP%d1#FfhZ73*5N&2>$>FPW%ZyvF}NCJ{*&nTpUTezumXH@3*`6Kk~XB zTvN-$CBDf?OKt9|yh~Kir<_{UQJX=#O?=g&JOWrdDf@)l#wY_$4O-cj%`Cb@{9WR9Y?owrma>ePzST7t@po*CXwm?HYxW59OpB=Hjr=;{ zX3OMeqb#u+1%cHl9>!{HFRcJrj>(u>mzebs5?+Cde_qgZY)fU_>^sjCWwnro58TWW|YWUqS^!?CLNo!bx*!ss+AE+@WgI*lS> zmT!BU`Wq;!>m9-eaTRYCZ$)MWoZVIzLmzd0$jMce`vEy({`H?o|=|2_aPDBiIC6Q zG_`=QlFPTEAdXD5wuKrMR8T&KY0vb{9!n+F2~^cjR6P_K?!QKeKo|BiANW{Q=1F29CPF=YlOb6byV z=i})gV=#YQzP4bpM_VLvxjd%J#~^C!2$xxbN%5;(g!AjQV(EyJ^DtN6Dwj)jd4O7V z?a3iue~rO~;S@LFEOTwoBUnMAbOh}rm)FMhcnDXkhoGW*(+?qe;1T0|p=Z7{`erQ} zxLn$uQn1c_f+HNkfySV&vnvT~CS8K$!7H7FiRWZj>LipKFtuYk0glHR*>$L2$9LTZ#M%``9?^zf_xLoWtelxOKuD?Fn)*#h_npJc&Rf& zBmEhi9oQEJ0pds?vcD)RFw^f`QT$G3>HfH}{Cc9_#$@}ki1KqBrbAnbcIu#@uZ*X& zr1Kl6*9_>J?NjSnEo%2j9K<})}dB7S>pdpr z1*;c3F22~)nPfUWcKfN7c{TXdfef z#Br~=GW6#A_#EYsQfgwb`0qw7b2bbWiNIW0NhgPVg%^-j2}99V5et~F9JTtD_;58z+YSJbxv diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1/UserEvent.php deleted file mode 100644 index baa1b8a95c67834d45bce950736c486108cc0737..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3252 zcmbVO&2k$>5RTTrYB`p@Aw)J5S(Fs9Az8)Y0-ImUQY=#yTa_4Bg;LelYIh`0Wwo=} znH2~s2X0)r@dO+>bK?o1cnHos0w;QAe`L#X$>59a+3s(8zV80IA3P3^L%3n=l7K{x zAfC}38RD22VZ;P;nQwICUXMhE%LXC!Nn{#E-(hU z`YiTp9_20@l4wMNJ`G51xK)ceiEJ_?fiM*~K;R4r4;_~nyY2cjA{@^VPG?u)bao_8 zr*RsmbF_6I!1W!@jV}?eDdFHdFz_dgyFPUdE*ycsZc=X3fC}pP^jmz^L!;;ToS^qv z+g=>Fg0jGn4hMltHa3j}Q`+7P8Pf33$O3CiW{{Q6ULZ&mIDV%=xEs+>u&9lumenUB z=Tn|+Y^K*rINCEdk{B)POpp%^5yj->?S>H%5l6v&6}JR z8B!Km*7#Lpkn>!hlQf+d_Bt<5ogFq9u;Aj?=e#yztVB%5|8PB|SW&_mgm3p%sl4-u zrit73ygW}&vA8#KW+l(J;7=Xy{@1G3uO}X+>H~A456t1#`dSLE61Ta**9@=6TT{Kv99wpvNk+%6v03KaVm~ z2Dyh07|IooM#L4i0*T1$81r43L!3oj2jGNrtQ;BRyo^y^7dm}{Qh?VjT=2R!dZ_Ex zVAT;KqTN{5qb=Ag5>yry@G{KzsE-0rDXRaUK+$7vJU~6-6)PxWp~YvuX`N}M>6dz`#;NdbH^72t*PQ3x$4ONIA|dMK4_T~;WysVLaz zsh>jn0#-!i1l&=Qngq10pzcnEIvhJHtTHSJr;pj>l`>LV)UU#2tf>J@qQv7Bb-WLd z<%#ghs$$=odYh~&H9*YmG|7ZF0}+k%M*sujQ74IBzhFL|Nf#OSx(nq=$P&!FBBP|O z^v5tabo`j8Mk?K#PRvfs1smj;miAep`VtoNLcIbdS>{7ZzLvGGnpcq}Yv0AW-e=J$ zXGb*Ti(d(!m%*-x=BJ0dhVRC3}f+o>p0Q zNx|rAuq2ppd|R1trR{Sn5sJOjj`cEJMp+)4SAWE?@xnuDyZ6tW{H&E5doOklj+)P3Hurb;_M5+G*LT&bZSKfb z+iYa3c2lkF=F!$4nMEhv#>eY;V$;EW{BNzAz*v^Tv8)Lo%R1WX&MSUDy_IiRx06lx S#A1BzQmibK)%6X$0r(el3rgNPPc>-E?kwAoo^ zXB~wq7Y?Z6$_*hTI3YkBkoYHZgnxhoC;kG&iJ95ibz;|Kjqt^*nfJbV^Sw9UdvCrS zjzX{wnN>3@Ks6BR=fKg8`z@BZndO5j7#Kx8Y9v5p2|3k6z=h5s9gX zY&axj=p)PXN!+*kIP%CC(PI=0ae%CG*@`1XyJ(C8*5zMg>>*Pg0zlv%q9}Ad1e=}e zL&V&^%Uq`^@tm5#bL!{uoc;190G{tg5q!+i8Ul7NK?P3$#vYFhOLaHTteGQQKmN{#qF@>pj5|AoCW6ZT~p zioOhrF~zGzL5GY>tRNPxUg9goZB0bF1TJ;Ck^JXdcYk;uEN3w)k=K7LfEUk`uD@|1 zFXtW9b=MZ))A&XE^tV60DEy=u717h4BJDC$a&` zMitpdqFn4VsXh46Xy*Xr4OwJNh{8hf`ey~OJe_X+{)L21yQGx8lzQ@#HHB_hxo#WZ zB;
      9rhpnM;nkS8A-&<);10v8=V|LIXTH-Pb(~K4)aB2mVzkcb%=D;R`PqMBi`EXY30>_ zm%?8wrf3S0ZCOW0M~duBC*7Ehl7aJf=(}t{=wbC~0jzTkP4hCZV^yzZ`B#!62f2=R z@Gx;nHI~cqkj%`pJOuvyr(zF#n=>ol7OvJ?d$sm{WA}r`PP4Vs_`YzxDMwpVP7Y>0 z9c>$OR5tg^r>TXbrr*igoogle.cloud.discoveryengine.v1.BigQuerySource - */ -class BigQuerySource extends \Google\Protobuf\Internal\Message -{ - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_id = ''; - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - */ - protected $gcs_staging_dir = ''; - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * - * Generated from protobuf field string data_schema = 6; - */ - protected $data_schema = ''; - protected $partition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Date $partition_date - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * @type string $project_id - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * @type string $dataset_id - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * @type string $table_id - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * @type string $gcs_staging_dir - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * @type string $data_schema - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * - * Generated from protobuf field .google.type.Date partition_date = 5; - * @return \Google\Type\Date|null - */ - public function getPartitionDate() - { - return $this->readOneof(5); - } - - public function hasPartitionDate() - { - return $this->hasOneof(5); - } - - /** - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * - * Generated from protobuf field .google.type.Date partition_date = 5; - * @param \Google\Type\Date $var - * @return $this - */ - public function setPartitionDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - * @return string - */ - public function getGcsStagingDir() - { - return $this->gcs_staging_dir; - } - - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - * @param string $var - * @return $this - */ - public function setGcsStagingDir($var) - { - GPBUtil::checkString($var, True); - $this->gcs_staging_dir = $var; - - return $this; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * - * Generated from protobuf field string data_schema = 6; - * @return string - */ - public function getDataSchema() - { - return $this->data_schema; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms the - * defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * - * Generated from protobuf field string data_schema = 6; - * @param string $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkString($var, True); - $this->data_schema = $var; - - return $this; - } - - /** - * @return string - */ - public function getPartition() - { - return $this->whichOneof("partition"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php deleted file mode 100644 index 932e8e6dbe75..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CollectUserEventRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.discoveryengine.v1.CollectUserEventRequest - */ -class CollectUserEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_event = ''; - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party - * requests. - * - * Generated from protobuf field optional string uri = 3; - */ - protected $uri = null; - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - */ - protected $ets = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type string $user_event - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * @type string $uri - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party - * requests. - * @type int|string $ets - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEventService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserEvent() - { - return $this->user_event; - } - - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserEvent($var) - { - GPBUtil::checkString($var, True); - $this->user_event = $var; - - return $this; - } - - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party - * requests. - * - * Generated from protobuf field optional string uri = 3; - * @return string - */ - public function getUri() - { - return isset($this->uri) ? $this->uri : ''; - } - - public function hasUri() - { - return isset($this->uri); - } - - public function clearUri() - { - unset($this->uri); - } - - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for 3rd party - * requests. - * - * Generated from protobuf field optional string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - * @return int|string - */ - public function getEts() - { - return isset($this->ets) ? $this->ets : 0; - } - - public function hasEts() - { - return isset($this->ets); - } - - public function clearEts() - { - unset($this->ets); - } - - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - * @param int|string $var - * @return $this - */ - public function setEts($var) - { - GPBUtil::checkInt64($var); - $this->ets = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php deleted file mode 100644 index 29cee2b13cad..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.discoveryengine.v1.CompleteQueryRequest - */ -class CompleteQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $data_store = ''; - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] - * dataStores. - * - * Generated from protobuf field string query_model = 3; - */ - protected $query_model = ''; - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - */ - protected $user_pseudo_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_store - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * @type string $query - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * @type string $query_model - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] - * dataStores. - * @type string $user_pseudo_id - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDataStore() - { - return $this->data_store; - } - - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataStore($var) - { - GPBUtil::checkString($var, True); - $this->data_store = $var; - - return $this; - } - - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] - * dataStores. - * - * Generated from protobuf field string query_model = 3; - * @return string - */ - public function getQueryModel() - { - return $this->query_model; - } - - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH] - * dataStores. - * - * Generated from protobuf field string query_model = 3; - * @param string $var - * @return $this - */ - public function setQueryModel($var) - { - GPBUtil::checkString($var, True); - $this->query_model = $var; - - return $this; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php deleted file mode 100644 index d08febbe893a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.discoveryengine.v1.CompleteQueryResponse - */ -class CompleteQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - */ - private $query_suggestions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $query_suggestions - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuerySuggestions() - { - return $this->query_suggestions; - } - - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuerySuggestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse\QuerySuggestion::class); - $this->query_suggestions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php deleted file mode 100644 index f9b9def77159..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompleteQueryResponse/QuerySuggestion.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion - */ -class QuerySuggestion extends \Google\Protobuf\Internal\Message -{ - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - */ - protected $suggestion = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $suggestion - * The suggestion for the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @return string - */ - public function getSuggestion() - { - return $this->suggestion; - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @param string $var - * @return $this - */ - public function setSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->suggestion = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuerySuggestion::class, \Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse_QuerySuggestion::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php deleted file mode 100644 index c9a22fbf87c1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CompletionInfo.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.discoveryengine.v1.CompletionInfo - */ -class CompletionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. - * - * Generated from protobuf field string selected_suggestion = 1; - */ - protected $selected_suggestion = ''; - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - */ - protected $selected_position = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $selected_suggestion - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. - * @type int $selected_position - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] - * position, starting from 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. - * - * Generated from protobuf field string selected_suggestion = 1; - * @return string - */ - public function getSelectedSuggestion() - { - return $this->selected_suggestion; - } - - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][]. - * - * Generated from protobuf field string selected_suggestion = 1; - * @param string $var - * @return $this - */ - public function setSelectedSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->selected_suggestion = $var; - - return $this; - } - - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - * @return int - */ - public function getSelectedPosition() - { - return $this->selected_position; - } - - /** - * End user selected [CompleteQueryResponse.CompletionResult.suggestion][] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - * @param int $var - * @return $this - */ - public function setSelectedPosition($var) - { - GPBUtil::checkInt32($var); - $this->selected_position = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php deleted file mode 100644 index 82088e790bb0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateDocumentRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.discoveryengine.v1.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [Document][google.cloud.discoveryengine.v1.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1.Document], which will become the - * final component of the - * [Document.name][google.cloud.discoveryengine.v1.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1.Document]s with the same - * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document_id = ''; - - /** - * @param string $parent Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Please see - * {@see DocumentServiceClient::branchName()} for help formatting this field. - * @param \Google\Cloud\DiscoveryEngine\V1\Document $document Required. The [Document][google.cloud.discoveryengine.v1.Document] to - * create. - * @param string $documentId Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1.Document], which will become the - * final component of the - * [Document.name][google.cloud.discoveryengine.v1.Document.name]. - * - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1.Document]s with the same - * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * @return \Google\Cloud\DiscoveryEngine\V1\CreateDocumentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1\Document $document, string $documentId): self - { - return (new self()) - ->setParent($parent) - ->setDocument($document) - ->setDocumentId($documentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * @type \Google\Cloud\DiscoveryEngine\V1\Document $document - * Required. The [Document][google.cloud.discoveryengine.v1.Document] to - * create. - * @type string $document_id - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1.Document], which will become the - * final component of the - * [Document.name][google.cloud.discoveryengine.v1.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1.Document]s with the same - * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The [Document][google.cloud.discoveryengine.v1.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The [Document][google.cloud.discoveryengine.v1.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1.Document], which will become the - * final component of the - * [Document.name][google.cloud.discoveryengine.v1.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1.Document]s with the same - * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1.Document], which will become the - * final component of the - * [Document.name][google.cloud.discoveryengine.v1.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1.Document]s with the same - * [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php deleted file mode 100644 index 9372aa713f66..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1.CreateSchemaMetadata - */ -class CreateSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php deleted file mode 100644 index 53ae57f984be..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CreateSchemaRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.discoveryengine.v1.CreateSchemaRequest - */ -class CreateSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema_id = ''; - - /** - * @param string $parent Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see - * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. - * @param \Google\Cloud\DiscoveryEngine\V1\Schema $schema Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. - * @param string $schemaId Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. - * - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * @return \Google\Cloud\DiscoveryEngine\V1\CreateSchemaRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1\Schema $schema, string $schemaId): self - { - return (new self()) - ->setParent($parent) - ->setSchema($schema) - ->setSchemaId($schemaId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type \Google\Cloud\DiscoveryEngine\V1\Schema $schema - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. - * @type string $schema_id - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class); - $this->schema = $var; - - return $this; - } - - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSchemaId() - { - return $this->schema_id; - } - - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSchemaId($var) - { - GPBUtil::checkString($var, True); - $this->schema_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php deleted file mode 100644 index 96ea2b044491..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/CustomAttribute.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.discoveryengine.v1.CustomAttribute - */ -class CustomAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - */ - private $text; - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - */ - private $numbers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $text - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $numbers - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getText() - { - return $this->text; - } - - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setText($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text = $arr; - - return $this; - } - - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNumbers() - { - return $this->numbers; - } - - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNumbers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->numbers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php deleted file mode 100644 index dceaa5af0bdb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteDocumentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.discoveryengine.v1.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * - * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does - * not exist, a `NOT_FOUND` error is returned. Please see - * {@see DocumentServiceClient::documentName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\DeleteDocumentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does - * not exist, a `NOT_FOUND` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to delete does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php deleted file mode 100644 index b333f2a7e673..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1.DeleteSchemaMetadata - */ -class DeleteSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php deleted file mode 100644 index bdfd90bd77c2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DeleteSchemaRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.discoveryengine.v1.DeleteSchemaRequest - */ -class DeleteSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see - * {@see SchemaServiceClient::schemaName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\DeleteSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php deleted file mode 100644 index 46b5f5f5e16e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document.php +++ /dev/null @@ -1,393 +0,0 @@ -google.cloud.discoveryengine.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $id = ''; - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - */ - protected $schema_id = ''; - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; - */ - protected $content = null; - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - */ - protected $parent_document_id = ''; - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $derived_struct_data = null; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $struct_data - * The structured JSON data for the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * @type string $json_data - * The JSON string representation of the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * @type string $name - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * @type string $id - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * @type string $schema_id - * The identifier of the schema located in the same data store. - * @type \Google\Cloud\DiscoveryEngine\V1\Document\Content $content - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * @type string $parent_document_id - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * @type \Google\Protobuf\Struct $derived_struct_data - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The structured JSON data for the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field .google.protobuf.Struct struct_data = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getStructData() - { - return $this->readOneof(4); - } - - public function hasStructData() - { - return $this->hasOneof(4); - } - - /** - * The structured JSON data for the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field .google.protobuf.Struct struct_data = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setStructData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The JSON string representation of the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field string json_data = 5; - * @return string - */ - public function getJsonData() - { - return $this->readOneof(5); - } - - public function hasJsonData() - { - return $this->hasOneof(5); - } - - /** - * The JSON string representation of the document. It should conform to the - * registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema] - * or an `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field string json_data = 5; - * @param string $var - * @return $this - */ - public function setJsonData($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - * @return string - */ - public function getSchemaId() - { - return $this->schema_id; - } - - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - * @param string $var - * @return $this - */ - public function setSchemaId($var) - { - GPBUtil::checkString($var, True); - $this->schema_id = $var; - - return $this; - } - - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; - * @return \Google\Cloud\DiscoveryEngine\V1\Document\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document.Content content = 10; - * @param \Google\Cloud\DiscoveryEngine\V1\Document\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document\Content::class); - $this->content = $var; - - return $this; - } - - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - * @return string - */ - public function getParentDocumentId() - { - return $this->parent_document_id; - } - - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - * @param string $var - * @return $this - */ - public function setParentDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->parent_document_id = $var; - - return $this; - } - - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Struct|null - */ - public function getDerivedStructData() - { - return $this->derived_struct_data; - } - - public function hasDerivedStructData() - { - return isset($this->derived_struct_data); - } - - public function clearDerivedStructData() - { - unset($this->derived_struct_data); - } - - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDerivedStructData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->derived_struct_data = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php deleted file mode 100644 index b394729ad29f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Document/Content.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.discoveryengine.v1.Document.Content - */ -class Content extends \Google\Protobuf\Internal\Message -{ - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF) - * * `text/html` (HTML) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - */ - protected $mime_type = ''; - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $raw_bytes - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * @type string $uri - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * @type string $mime_type - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF) - * * `text/html` (HTML) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field bytes raw_bytes = 2; - * @return string - */ - public function getRawBytes() - { - return $this->readOneof(2); - } - - public function hasRawBytes() - { - return $this->hasOneof(2); - } - - /** - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field bytes raw_bytes = 2; - * @param string $var - * @return $this - */ - public function setRawBytes($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * - * Generated from protobuf field string uri = 3; - * @return string - */ - public function getUri() - { - return $this->readOneof(3); - } - - public function hasUri() - { - return $this->hasOneof(3); - } - - /** - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * - * Generated from protobuf field string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF) - * * `text/html` (HTML) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF) - * * `text/html` (HTML) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Content::class, \Google\Cloud\DiscoveryEngine\V1\Document_Content::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php deleted file mode 100644 index ee58cf2d96ce..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/DocumentInfo.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.discoveryengine.v1.DocumentInfo - */ -class DocumentInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - */ - protected $quantity = null; - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - */ - private $promotion_ids; - protected $document_descriptor; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. The Document resource ID. - * @type string $name - * Required. The Document resource full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * @type int $quantity - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Document resource ID. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->readOneof(1); - } - - public function hasId() - { - return $this->hasOneof(1); - } - - /** - * Required. The Document resource ID. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. The Document resource full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->readOneof(2); - } - - public function hasName() - { - return $this->hasOneof(2); - } - - /** - * Required. The Document resource full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - * @return int - */ - public function getQuantity() - { - return isset($this->quantity) ? $this->quantity : 0; - } - - public function hasQuantity() - { - return isset($this->quantity); - } - - public function clearQuantity() - { - unset($this->quantity); - } - - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - * @param int $var - * @return $this - */ - public function setQuantity($var) - { - GPBUtil::checkInt32($var); - $this->quantity = $var; - - return $this; - } - - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPromotionIds() - { - return $this->promotion_ids; - } - - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPromotionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->promotion_ids = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDocumentDescriptor() - { - return $this->whichOneof("document_descriptor"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php deleted file mode 100644 index cb6a2d1122b4..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GcsSource.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.discoveryengine.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $input_uris; - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1.Document] per line. Each - * document must - * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - */ - protected $data_schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $input_uris - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * @type string $data_schema - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1.Document] per line. Each - * document must - * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputUris() - { - return $this->input_uris; - } - - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_uris = $arr; - - return $this; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1.Document] per line. Each - * document must - * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - * @return string - */ - public function getDataSchema() - { - return $this->data_schema; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1.Document] per line. Each - * document must - * have a valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` will become a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by the GENERIC Data Store vertical. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - * @param string $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkString($var, True); - $this->data_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php deleted file mode 100644 index 78e81f128155..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetDocumentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.discoveryengine.v1.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1.Document] does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * - * If the requested [Document][google.cloud.discoveryengine.v1.Document] does - * not exist, a `NOT_FOUND` error is returned. Please see - * {@see DocumentServiceClient::documentName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\GetDocumentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1.Document] does - * not exist, a `NOT_FOUND` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1.Document] does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1.Document] does - * not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php deleted file mode 100644 index 4a9036b219e9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/GetSchemaRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.discoveryengine.v1.GetSchemaRequest - */ -class GetSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see - * {@see SchemaServiceClient::schemaName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\GetSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php deleted file mode 100644 index fcc1ed29ed0e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were processed successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php deleted file mode 100644 index 40ee0fcb274e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest.php +++ /dev/null @@ -1,493 +0,0 @@ -google.cloud.discoveryengine.v1.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - */ - protected $error_config = null; - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - */ - protected $reconciliation_mode = 0; - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have - * to be specified using - * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - */ - protected $auto_generate_ids = false; - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of - * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * with 1-63 characters. Otherwise, documents without valid IDs will fail to - * be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - */ - protected $id_field = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource $inline_source - * The Inline source for the input content for documents. - * @type \Google\Cloud\DiscoveryEngine\V1\GcsSource $gcs_source - * Cloud Storage location for the input content. - * @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source - * BigQuery input source. - * @type string $parent - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config - * The desired location of errors incurred during the Import. - * @type int $reconciliation_mode - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * @type bool $auto_generate_ids - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have - * to be specified using - * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. - * @type string $id_field - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of - * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * with 1-63 characters. Otherwise, documents without valid IDs will fail to - * be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * The Inline source for the input content for documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource inline_source = 2; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource|null - */ - public function getInlineSource() - { - return $this->readOneof(2); - } - - public function hasInlineSource() - { - return $this->hasOneof(2); - } - - /** - * The Inline source for the input content for documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource inline_source = 2; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource $var - * @return $this - */ - public function setInlineSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\InlineSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3; - * @return \Google\Cloud\DiscoveryEngine\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(3); - } - - public function hasGcsSource() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3; - * @param \Google\Cloud\DiscoveryEngine\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\GcsSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4; - * @return \Google\Cloud\DiscoveryEngine\V1\BigQuerySource|null - */ - public function getBigquerySource() - { - return $this->readOneof(4); - } - - public function hasBigquerySource() - { - return $this->hasOneof(4); - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4; - * @param \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $var - * @return $this - */ - public function setBigquerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigQuerySource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - * @return int - */ - public function getReconciliationMode() - { - return $this->reconciliation_mode; - } - - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - * @param int $var - * @return $this - */ - public function setReconciliationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest\ReconciliationMode::class); - $this->reconciliation_mode = $var; - - return $this; - } - - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have - * to be specified using - * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - * @return bool - */ - public function getAutoGenerateIds() - { - return $this->auto_generate_ids; - } - - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1.Document.id]s have - * to be specified using - * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], - * otherwises, documents without IDs will fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - * @param bool $var - * @return $this - */ - public function setAutoGenerateIds($var) - { - GPBUtil::checkBool($var); - $this->auto_generate_ids = $var; - - return $this; - } - - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of - * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * with 1-63 characters. Otherwise, documents without valid IDs will fail to - * be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - * @return string - */ - public function getIdField() - { - return $this->id_field; - } - - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of - * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column will be used as the - * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * with 1-63 characters. Otherwise, documents without valid IDs will fail to - * be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - * @param string $var - * @return $this - */ - public function setIdField($var) - { - GPBUtil::checkString($var, True); - $this->id_field = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php deleted file mode 100644 index 91d8e2deac22..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/InlineSource.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * Recommended max of 100 items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Document::class); - $this->documents = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest_InlineSource::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php deleted file mode 100644 index 3bd3f7cb3ce6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsRequest/ReconciliationMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode - */ -class ReconciliationMode -{ - /** - * Defaults to INCREMENTAL. - * - * Generated from protobuf enum RECONCILIATION_MODE_UNSPECIFIED = 0; - */ - const RECONCILIATION_MODE_UNSPECIFIED = 0; - /** - * Inserts new documents or updates existing documents. - * - * Generated from protobuf enum INCREMENTAL = 1; - */ - const INCREMENTAL = 1; - /** - * Calculates diff and replaces the entire document dataset. Existing - * documents may be deleted if they are not present in the source location. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::RECONCILIATION_MODE_UNSPECIFIED => 'RECONCILIATION_MODE_UNSPECIFIED', - self::INCREMENTAL => 'INCREMENTAL', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReconciliationMode::class, \Google\Cloud\DiscoveryEngine\V1\ImportDocumentsRequest_ReconciliationMode::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php deleted file mode 100644 index 418453382756..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportDocumentsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.discoveryengine.v1.ImportDocumentsResponse - */ -class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - */ - private $error_samples; - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - */ - protected $error_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples - * A sample of errors encountered while processing the request. - * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config - * Echoes the destination for the complete errors in the request if set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorSamples() - { - return $this->error_samples; - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorSamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->error_samples = $arr; - - return $this; - } - - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php deleted file mode 100644 index fc0b136a9a50..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportErrorConfig.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.discoveryengine.v1.ImportErrorConfig - */ -class ImportErrorConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_prefix - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * - * Generated from protobuf field string gcs_prefix = 1; - * @return string - */ - public function getGcsPrefix() - { - return $this->readOneof(1); - } - - public function hasGcsPrefix() - { - return $this->hasOneof(1); - } - - /** - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors will be written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * - * Generated from protobuf field string gcs_prefix = 1; - * @param string $var - * @return $this - */ - public function setGcsPrefix($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php deleted file mode 100644 index 63b5eecf2321..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1.ImportUserEventsMetadata - */ -class ImportUserEventsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were processed successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php deleted file mode 100644 index e7b9dedcab68..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.discoveryengine.v1.ImportUserEventsRequest - */ -class ImportUserEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - */ - protected $error_config = null; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource $inline_source - * Required. The Inline source for the input content for UserEvents. - * @type \Google\Cloud\DiscoveryEngine\V1\GcsSource $gcs_source - * Required. Cloud Storage location for the input content. - * @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source - * Required. BigQuery input source. - * @type string $parent - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Inline source for the input content for UserEvents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource inline_source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource|null - */ - public function getInlineSource() - { - return $this->readOneof(2); - } - - public function hasInlineSource() - { - return $this->hasOneof(2); - } - - /** - * Required. The Inline source for the input content for UserEvents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource inline_source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource $var - * @return $this - */ - public function setInlineSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest\InlineSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(3); - } - - public function hasGcsSource() - { - return $this->hasOneof(3); - } - - /** - * Required. Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.GcsSource gcs_source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\GcsSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\BigQuerySource|null - */ - public function getBigquerySource() - { - return $this->readOneof(4); - } - - public function hasBigquerySource() - { - return $this->hasOneof(4); - } - - /** - * Required. BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $var - * @return $this - */ - public function setBigquerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigQuerySource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php deleted file mode 100644 index 57f60a5f14e6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsRequest/InlineSource.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $user_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\UserEvent>|\Google\Protobuf\Internal\RepeatedField $user_events - * Required. A list of user events to import. Recommended max of 10k items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserEvents() - { - return $this->user_events; - } - - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\DiscoveryEngine\V1\UserEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\UserEvent::class); - $this->user_events = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1\ImportUserEventsRequest_InlineSource::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php deleted file mode 100644 index 564563223aa5..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ImportUserEventsResponse.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.discoveryengine.v1.ImportUserEventsResponse - */ -class ImportUserEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - */ - private $error_samples; - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - */ - protected $error_config = null; - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - */ - protected $joined_events_count = 0; - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - */ - protected $unjoined_events_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples - * A sample of errors encountered while processing the request. - * @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config - * Echoes the destination for the complete errors if this field was set in - * the request. - * @type int|string $joined_events_count - * Count of user events imported with complete existing Documents. - * @type int|string $unjoined_events_count - * Count of user events imported, but with Document information not found - * in the existing Branch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorSamples() - { - return $this->error_samples; - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorSamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->error_samples = $arr; - - return $this; - } - - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 2; - * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - * @return int|string - */ - public function getJoinedEventsCount() - { - return $this->joined_events_count; - } - - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - * @param int|string $var - * @return $this - */ - public function setJoinedEventsCount($var) - { - GPBUtil::checkInt64($var); - $this->joined_events_count = $var; - - return $this; - } - - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - * @return int|string - */ - public function getUnjoinedEventsCount() - { - return $this->unjoined_events_count; - } - - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - * @param int|string $var - * @return $this - */ - public function setUnjoinedEventsCount($var) - { - GPBUtil::checkInt64($var); - $this->unjoined_events_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php deleted file mode 100644 index e5bef2190ea6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.discoveryengine.v1.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list [Documents][]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to 100. The maximum allowed value is 1000. - * Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * - * If the caller does not have permission to list [Documents][]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. Please see - * {@see DocumentServiceClient::branchName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\ListDocumentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list [Documents][]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * @type int $page_size - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to 100. The maximum allowed value is 1000. - * Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * @type string $page_token - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list [Documents][]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list [Documents][]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to 100. The maximum allowed value is 1000. - * Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to 100. The maximum allowed value is 1000. - * Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php deleted file mode 100644 index 6a0ca3c4c9eb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListDocumentsResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The [Document][google.cloud.discoveryengine.v1.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; - */ - private $documents; - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * The [Document][google.cloud.discoveryengine.v1.Document]s. - * @type string $next_page_token - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * The [Document][google.cloud.discoveryengine.v1.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The [Document][google.cloud.discoveryengine.v1.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Document documents = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php deleted file mode 100644 index d627a855cfeb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.discoveryengine.v1.ListSchemasRequest - */ -class ListSchemasRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to - * return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see - * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1\ListSchemasRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type int $page_size - * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to - * return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to - * return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1.Schema]s to - * return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php deleted file mode 100644 index 4705d7ca0f55..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/ListSchemasResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1.ListSchemasResponse - */ -class ListSchemasResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The [Schema][google.cloud.discoveryengine.v1.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; - */ - private $schemas; - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas - * The [Schema][google.cloud.discoveryengine.v1.Schema]s. - * @type string $next_page_token - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * The [Schema][google.cloud.discoveryengine.v1.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchemas() - { - return $this->schemas; - } - - /** - * The [Schema][google.cloud.discoveryengine.v1.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.Schema schemas = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchemas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\Schema::class); - $this->schemas = $arr; - - return $this; - } - - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php deleted file mode 100644 index d0f24f41d58a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/MediaInfo.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.discoveryengine.v1.MediaInfo - */ -class MediaInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - */ - protected $media_progress_duration = null; - /** - * Media progress should be computed using only the media_progress_duration - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - */ - protected $media_progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $media_progress_duration - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. - * @type float $media_progress_percentage - * Media progress should be computed using only the media_progress_duration - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMediaProgressDuration() - { - return $this->media_progress_duration; - } - - public function hasMediaProgressDuration() - { - return isset($this->media_progress_duration); - } - - public function clearMediaProgressDuration() - { - unset($this->media_progress_duration); - } - - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should - * be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMediaProgressDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->media_progress_duration = $var; - - return $this; - } - - /** - * Media progress should be computed using only the media_progress_duration - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - * @return float - */ - public function getMediaProgressPercentage() - { - return isset($this->media_progress_percentage) ? $this->media_progress_percentage : 0.0; - } - - public function hasMediaProgressPercentage() - { - return isset($this->media_progress_percentage); - } - - public function clearMediaProgressPercentage() - { - unset($this->media_progress_percentage); - } - - /** - * Media progress should be computed using only the media_progress_duration - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - * @param float $var - * @return $this - */ - public function setMediaProgressPercentage($var) - { - GPBUtil::checkFloat($var); - $this->media_progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php deleted file mode 100644 index 03ee5f4110fe..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PageInfo.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.discoveryengine.v1.PageInfo - */ -class PageInfo extends \Google\Protobuf\Internal\Message -{ - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - */ - protected $pageview_id = ''; - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string page_category = 2; - */ - protected $page_category = ''; - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - */ - protected $uri = ''; - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - */ - protected $referrer_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pageview_id - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * @type string $page_category - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * @type string $uri - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * @type string $referrer_uri - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - * @return string - */ - public function getPageviewId() - { - return $this->pageview_id; - } - - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageViewId` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - * @param string $var - * @return $this - */ - public function setPageviewId($var) - { - GPBUtil::checkString($var, True); - $this->pageview_id = $var; - - return $this; - } - - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string page_category = 2; - * @return string - */ - public function getPageCategory() - { - return $this->page_category; - } - - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * "pageCategory" : "Sales > 2017 Black Friday Deals". - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string page_category = 2; - * @param string $var - * @return $this - */ - public function setPageCategory($var) - { - GPBUtil::checkString($var, True); - $this->page_category = $var; - - return $this; - } - - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - * @return string - */ - public function getReferrerUri() - { - return $this->referrer_uri; - } - - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - * @param string $var - * @return $this - */ - public function setReferrerUri($var) - { - GPBUtil::checkString($var, True); - $this->referrer_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php deleted file mode 100644 index d80f94dd4e0f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PanelInfo.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.discoveryengine.v1.PanelInfo - */ -class PanelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $panel_id = ''; - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must - * also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - */ - protected $panel_position = null; - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - */ - protected $total_panels = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $panel_id - * Required. The panel ID. - * @type string $display_name - * The display name of the panel. - * @type int $panel_position - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must - * also be set. - * @type int $total_panels - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] - * is set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPanelId() - { - return $this->panel_id; - } - - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPanelId($var) - { - GPBUtil::checkString($var, True); - $this->panel_id = $var; - - return $this; - } - - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must - * also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - * @return int - */ - public function getPanelPosition() - { - return isset($this->panel_position) ? $this->panel_position : 0; - } - - public function hasPanelPosition() - { - return isset($this->panel_position); - } - - public function clearPanelPosition() - { - unset($this->panel_position); - } - - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] must - * also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - * @param int $var - * @return $this - */ - public function setPanelPosition($var) - { - GPBUtil::checkInt32($var); - $this->panel_position = $var; - - return $this; - } - - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - * @return int - */ - public function getTotalPanels() - { - return isset($this->total_panels) ? $this->total_panels : 0; - } - - public function hasTotalPanels() - { - return isset($this->total_panels); - } - - public function clearTotalPanels() - { - unset($this->total_panels); - } - - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - * @param int $var - * @return $this - */ - public function setTotalPanels($var) - { - GPBUtil::checkInt32($var); - $this->total_panels = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php deleted file mode 100644 index e059a000bd93..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - */ -class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were deleted successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php deleted file mode 100644 index 5837015fdf4d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.discoveryengine.v1.PurgeDocumentsRequest - */ -class PurgeDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * @type string $filter - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * @type bool $force - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php deleted file mode 100644 index 76d2ceda2540..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/PurgeDocumentsResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.discoveryengine.v1.PurgeDocumentsResponse - */ -class PurgeDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - */ - protected $purge_count = 0; - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - */ - private $purge_sample; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $purge_count - * The total count of documents purged as a result of the operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $purge_sample - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - * @return int|string - */ - public function getPurgeCount() - { - return $this->purge_count; - } - - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - * @param int|string $var - * @return $this - */ - public function setPurgeCount($var) - { - GPBUtil::checkInt64($var); - $this->purge_count = $var; - - return $this; - } - - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPurgeSample() - { - return $this->purge_sample; - } - - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPurgeSample($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->purge_sample = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php deleted file mode 100644 index 64fc1fe7b94a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/Schema.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.discoveryengine.v1.Schema - */ -class Schema extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $struct_schema - * The structured representation of the schema. - * @type string $json_schema - * The JSON representation of the schema. - * @type string $name - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\Schema::initOnce(); - parent::__construct($data); - } - - /** - * The structured representation of the schema. - * - * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getStructSchema() - { - return $this->readOneof(2); - } - - public function hasStructSchema() - { - return $this->hasOneof(2); - } - - /** - * The structured representation of the schema. - * - * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setStructSchema($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The JSON representation of the schema. - * - * Generated from protobuf field string json_schema = 3; - * @return string - */ - public function getJsonSchema() - { - return $this->readOneof(3); - } - - public function hasJsonSchema() - { - return $this->hasOneof(3); - } - - /** - * The JSON representation of the schema. - * - * Generated from protobuf field string json_schema = 3; - * @param string $var - * @return $this - */ - public function setJsonSchema($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php deleted file mode 100644 index 34f3bf43cc53..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchInfo.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.discoveryengine.v1.SearchInfo - */ -class SearchInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or - * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string search_query = 1; - */ - protected $search_query = ''; - /** - * The order in which products are returned, if applicable. - * See [SearchRequest.order_by][] for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string order_by = 2; - */ - protected $order_by = ''; - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] - * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $search_query - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or - * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. - * @type string $order_by - * The order in which products are returned, if applicable. - * See [SearchRequest.order_by][] for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * @type int $offset - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] - * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or - * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string search_query = 1; - * @return string - */ - public function getSearchQuery() - { - return $this->search_query; - } - - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or - * [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string search_query = 1; - * @param string $var - * @return $this - */ - public function setSearchQuery($var) - { - GPBUtil::checkString($var, True); - $this->search_query = $var; - - return $this; - } - - /** - * The order in which products are returned, if applicable. - * See [SearchRequest.order_by][] for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string order_by = 2; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order in which products are returned, if applicable. - * See [SearchRequest.order_by][] for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string order_by = 2; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] - * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - * @return int - */ - public function getOffset() - { - return isset($this->offset) ? $this->offset : 0; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] - * for definition. - * If this field is negative, an INVALID_ARGUMENT is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php deleted file mode 100644 index dfd57af8f690..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest.php +++ /dev/null @@ -1,779 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest - */ -class SearchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $serving_config = ''; - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - */ - protected $branch = ''; - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - */ - protected $query = ''; - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 will be coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as - * relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is - * unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; - */ - protected $user_info = null; - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - */ - private $params; - /** - * The query expansion specification that specifies the conditions under which - * query expansion will occur. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - */ - protected $query_expansion_spec = null; - /** - * The spell correction specification that specifies the mode under - * which spell correction will take effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - */ - protected $spell_correction_spec = null; - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - */ - protected $user_pseudo_id = ''; - /** - * The content search spec that configs the desired behavior of content - * search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; - */ - protected $content_search_spec = null; - /** - * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. - * - * Generated from protobuf field bool safe_search = 20; - */ - protected $safe_search = false; - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - */ - private $user_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serving_config - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * @type string $branch - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * @type string $query - * Raw search query. - * @type int $page_size - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 will be coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * @type string $page_token - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * @type int $offset - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as - * relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is - * unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * @type \Google\Cloud\DiscoveryEngine\V1\UserInfo $user_info - * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. - * @type array|\Google\Protobuf\Internal\MapField $params - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec $query_expansion_spec - * The query expansion specification that specifies the conditions under which - * query expansion will occur. - * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec $spell_correction_spec - * The spell correction specification that specifies the mode under - * which spell correction will take effect. - * @type string $user_pseudo_id - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec $content_search_spec - * The content search spec that configs the desired behavior of content - * search. - * @type bool $safe_search - * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServingConfig() - { - return $this->serving_config; - } - - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServingConfig($var) - { - GPBUtil::checkString($var, True); - $this->serving_config = $var; - - return $this; - } - - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getBranch() - { - return $this->branch; - } - - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBranch($var) - { - GPBUtil::checkString($var, True); - $this->branch = $var; - - return $this; - } - - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 will be coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 will be coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as - * relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is - * unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1.Document]s deemed by the API as - * relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is - * unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; - * @return \Google\Cloud\DiscoveryEngine\V1\UserInfo|null - */ - public function getUserInfo() - { - return $this->user_info; - } - - public function hasUserInfo() - { - return isset($this->user_info); - } - - public function clearUserInfo() - { - unset($this->user_info); - } - - /** - * Information about the end user. - * Highly recommended for analytics. The user_agent string in UserInfo will - * be used to deduce device_type for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 21; - * @param \Google\Cloud\DiscoveryEngine\V1\UserInfo $var - * @return $this - */ - public function setUserInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserInfo::class); - $this->user_info = $var; - - return $this; - } - - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParams() - { - return $this->params; - } - - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParams($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->params = $arr; - - return $this; - } - - /** - * The query expansion specification that specifies the conditions under which - * query expansion will occur. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec|null - */ - public function getQueryExpansionSpec() - { - return $this->query_expansion_spec; - } - - public function hasQueryExpansionSpec() - { - return isset($this->query_expansion_spec); - } - - public function clearQueryExpansionSpec() - { - unset($this->query_expansion_spec); - } - - /** - * The query expansion specification that specifies the conditions under which - * query expansion will occur. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec $var - * @return $this - */ - public function setQueryExpansionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec::class); - $this->query_expansion_spec = $var; - - return $this; - } - - /** - * The spell correction specification that specifies the mode under - * which spell correction will take effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec|null - */ - public function getSpellCorrectionSpec() - { - return $this->spell_correction_spec; - } - - public function hasSpellCorrectionSpec() - { - return isset($this->spell_correction_spec); - } - - public function clearSpellCorrectionSpec() - { - unset($this->spell_correction_spec); - } - - /** - * The spell correction specification that specifies the mode under - * which spell correction will take effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec $var - * @return $this - */ - public function setSpellCorrectionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec::class); - $this->spell_correction_spec = $var; - - return $this; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - - /** - * The content search spec that configs the desired behavior of content - * search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; - * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec|null - */ - public function getContentSearchSpec() - { - return $this->content_search_spec; - } - - public function hasContentSearchSpec() - { - return isset($this->content_search_spec); - } - - public function clearContentSearchSpec() - { - unset($this->content_search_spec); - } - - /** - * The content search spec that configs the desired behavior of content - * search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec content_search_spec = 24; - * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec $var - * @return $this - */ - public function setContentSearchSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec::class); - $this->content_search_spec = $var; - - return $this; - } - - /** - * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. - * - * Generated from protobuf field bool safe_search = 20; - * @return bool - */ - public function getSafeSearch() - { - return $this->safe_search; - } - - /** - * Whether to turn on safe search. This is only supported for - * [ContentConfig.PUBLIC_WEBSITE][]. - * - * Generated from protobuf field bool safe_search = 20; - * @param bool $var - * @return $this - */ - public function setSafeSearch($var) - { - GPBUtil::checkBool($var); - $this->safe_search = $var; - - return $this; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php deleted file mode 100644 index af123b1d9bc6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec - */ -class ContentSearchSpec extends \Google\Protobuf\Internal\Message -{ - /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - */ - protected $snippet_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec $snippet_spec - * If there is no snippet spec provided, there will be no snippet in the - * search result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec|null - */ - public function getSnippetSpec() - { - return $this->snippet_spec; - } - - public function hasSnippetSpec() - { - return isset($this->snippet_spec); - } - - public function clearSnippetSpec() - { - unset($this->snippet_spec); - } - - /** - * If there is no snippet spec provided, there will be no snippet in the - * search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec $var - * @return $this - */ - public function setSnippetSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SnippetSpec::class); - $this->snippet_spec = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentSearchSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_ContentSearchSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php deleted file mode 100644 index 9a15204a7c6a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/ContentSearchSpec/SnippetSpec.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec - */ -class SnippetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Max number of snippets returned in each search result. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. - * - * Generated from protobuf field int32 max_snippet_count = 1; - */ - protected $max_snippet_count = 0; - /** - * if true, only snippet reference is returned. - * - * Generated from protobuf field bool reference_only = 2; - */ - protected $reference_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_snippet_count - * Max number of snippets returned in each search result. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. - * @type bool $reference_only - * if true, only snippet reference is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Max number of snippets returned in each search result. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. - * - * Generated from protobuf field int32 max_snippet_count = 1; - * @return int - */ - public function getMaxSnippetCount() - { - return $this->max_snippet_count; - } - - /** - * Max number of snippets returned in each search result. - * If the matching snippets is less than the max_snippet_count, return all - * of the snippets; otherwise, return the max_snippet_count. - * At most 5 snippets will be returned for each SearchResult. - * - * Generated from protobuf field int32 max_snippet_count = 1; - * @param int $var - * @return $this - */ - public function setMaxSnippetCount($var) - { - GPBUtil::checkInt32($var); - $this->max_snippet_count = $var; - - return $this; - } - - /** - * if true, only snippet reference is returned. - * - * Generated from protobuf field bool reference_only = 2; - * @return bool - */ - public function getReferenceOnly() - { - return $this->reference_only; - } - - /** - * if true, only snippet reference is returned. - * - * Generated from protobuf field bool reference_only = 2; - * @param bool $var - * @return $this - */ - public function setReferenceOnly($var) - { - GPBUtil::checkBool($var); - $this->reference_only = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SnippetSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_ContentSearchSpec_SnippetSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php deleted file mode 100644 index 6ad22de76c72..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec - */ -class QueryExpansionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; - */ - protected $condition = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $condition - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; - * @return int - */ - public function getCondition() - { - return $this->condition; - } - - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition condition = 1; - * @param int $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\QueryExpansionSpec\Condition::class); - $this->condition = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryExpansionSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_QueryExpansionSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php deleted file mode 100644 index 56b0c02ecb48..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/QueryExpansionSpec/Condition.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition - */ -class Condition -{ - /** - * Unspecified query expansion condition. In this case, server behavior - * defaults to - * [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf enum CONDITION_UNSPECIFIED = 0; - */ - const CONDITION_UNSPECIFIED = 0; - /** - * Disabled query expansion. Only the exact search query is used, even if - * [SearchResponse.total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] - * is zero. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Automatic query expansion built by the Search API. - * - * Generated from protobuf enum AUTO = 2; - */ - const AUTO = 2; - - private static $valueToName = [ - self::CONDITION_UNSPECIFIED => 'CONDITION_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::AUTO => 'AUTO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Condition::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_QueryExpansionSpec_Condition::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php deleted file mode 100644 index 6c4f39250b54..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec - */ -class SpellCorrectionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\SpellCorrectionSpec\Mode::class); - $this->mode = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpellCorrectionSpec::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_SpellCorrectionSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php deleted file mode 100644 index 307a50970c6c..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchRequest/SpellCorrectionSpec/Mode.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode - */ -class Mode -{ - /** - * Unspecified spell correction mode. In this case, server behavior - * defaults to - * [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Search API will try to find a spell suggestion if there - * is any and put in the - * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1.SearchResponse.corrected_query]. - * The spell suggestion will not be used as the search query. - * - * Generated from protobuf enum SUGGESTION_ONLY = 1; - */ - const SUGGESTION_ONLY = 1; - /** - * Automatic spell correction built by the Search API. Search will - * be based on the corrected query if found. - * - * Generated from protobuf enum AUTO = 2; - */ - const AUTO = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::SUGGESTION_ONLY => 'SUGGESTION_ONLY', - self::AUTO => 'AUTO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\DiscoveryEngine\V1\SearchRequest_SpellCorrectionSpec_Mode::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php deleted file mode 100644 index c052d79d7905..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.discoveryengine.v1.SearchResponse - */ -class SearchResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; - */ - private $results; - /** - * The estimated total count of matched items irrespective of pagination. The - * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from - * this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - */ - protected $attribution_token = ''; - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - */ - protected $next_page_token = ''; - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - */ - protected $corrected_query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $results - * A list of matched documents. The order represents the ranking. - * @type int $total_size - * The estimated total count of matched items irrespective of pagination. The - * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] - * that matches. - * @type string $attribution_token - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from - * this search, which enables accurate attribution of search model - * performance. - * @type string $next_page_token - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * @type string $corrected_query - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.SearchResult results = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\SearchResponse\SearchResult::class); - $this->results = $arr; - - return $this; - } - - /** - * The estimated total count of matched items irrespective of pagination. The - * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The estimated total count of matched items irrespective of pagination. The - * count of [results][google.cloud.discoveryengine.v1.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from - * this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - * @return string - */ - public function getAttributionToken() - { - return $this->attribution_token; - } - - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from - * this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - * @param string $var - * @return $this - */ - public function setAttributionToken($var) - { - GPBUtil::checkString($var, True); - $this->attribution_token = $var; - - return $this; - } - - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - * @return string - */ - public function getCorrectedQuery() - { - return $this->corrected_query; - } - - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - * @param string $var - * @return $this - */ - public function setCorrectedQuery($var) - { - GPBUtil::checkString($var, True); - $this->corrected_query = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php deleted file mode 100644 index 552044d3bfaf..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/SearchResponse/SearchResult.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.discoveryengine.v1.SearchResponse.SearchResult - */ -class SearchResult extends \Google\Protobuf\Internal\Message -{ - /** - * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1.Document]. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; - */ - protected $document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1.Document]. - * @type \Google\Cloud\DiscoveryEngine\V1\Document $document - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1.Document]. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * [Document.id][google.cloud.discoveryengine.v1.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1.Document]. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; - * @return \Google\Cloud\DiscoveryEngine\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; - * @param \Google\Cloud\DiscoveryEngine\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); - $this->document = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchResult::class, \Google\Cloud\DiscoveryEngine\V1\SearchResponse_SearchResult::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php deleted file mode 100644 index e4308487b3e6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/TransactionInfo.php +++ /dev/null @@ -1,369 +0,0 @@ -google.cloud.discoveryengine.v1.TransactionInfo - */ -class TransactionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = null; - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $currency = ''; - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - */ - protected $transaction_id = ''; - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - */ - protected $tax = null; - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - */ - protected $cost = null; - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - */ - protected $discount_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $value - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * @type string $currency - * Required. Currency code. Use three-character ISO-4217 code. - * @type string $transaction_id - * The transaction ID with a length limit of 128 characters. - * @type float $tax - * All the taxes associated with the transaction. - * @type float $cost - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * @type float $discount_value - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getValue() - { - return isset($this->value) ? $this->value : 0.0; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkFloat($var); - $this->value = $var; - - return $this; - } - - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCurrency($var) - { - GPBUtil::checkString($var, True); - $this->currency = $var; - - return $this; - } - - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - * @return string - */ - public function getTransactionId() - { - return $this->transaction_id; - } - - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - * @param string $var - * @return $this - */ - public function setTransactionId($var) - { - GPBUtil::checkString($var, True); - $this->transaction_id = $var; - - return $this; - } - - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - * @return float - */ - public function getTax() - { - return isset($this->tax) ? $this->tax : 0.0; - } - - public function hasTax() - { - return isset($this->tax); - } - - public function clearTax() - { - unset($this->tax); - } - - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - * @param float $var - * @return $this - */ - public function setTax($var) - { - GPBUtil::checkFloat($var); - $this->tax = $var; - - return $this; - } - - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - * @return float - */ - public function getCost() - { - return isset($this->cost) ? $this->cost : 0.0; - } - - public function hasCost() - { - return isset($this->cost); - } - - public function clearCost() - { - unset($this->cost); - } - - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkFloat($var); - $this->cost = $var; - - return $this; - } - - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - * @return float - */ - public function getDiscountValue() - { - return isset($this->discount_value) ? $this->discount_value : 0.0; - } - - public function hasDiscountValue() - { - return isset($this->discount_value); - } - - public function clearDiscountValue() - { - unset($this->discount_value); - } - - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: - * * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - * @param float $var - * @return $this - */ - public function setDiscountValue($var) - { - GPBUtil::checkFloat($var); - $this->discount_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php deleted file mode 100644 index 5a010ca542f9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateDocumentRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.discoveryengine.v1.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to update does - * not exist and - * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new - * [Document][google.cloud.discoveryengine.v1.Document] will be created. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1\Document $document - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to update does - * not exist and - * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * @type bool $allow_missing - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new - * [Document][google.cloud.discoveryengine.v1.Document] will be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to update does - * not exist and - * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether - * or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1.Document] to update does - * not exist and - * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new - * [Document][google.cloud.discoveryengine.v1.Document] will be created. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new - * [Document][google.cloud.discoveryengine.v1.Document] will be created. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php deleted file mode 100644 index 745e59a0275a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1.UpdateSchemaMetadata - */ -class UpdateSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php deleted file mode 100644 index 1c39456ca86b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UpdateSchemaRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.discoveryengine.v1.UpdateSchemaRequest - */ -class UpdateSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - /** - * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is - * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1\Schema $schema - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. - * @type bool $allow_missing - * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is - * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be - * created. In this situation, `update_mask` is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class); - $this->schema = $var; - - return $this; - } - - /** - * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is - * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is - * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php deleted file mode 100644 index 6a4db8868aef..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserEvent.php +++ /dev/null @@ -1,1166 +0,0 @@ -google.cloud.discoveryengine.v1.UserEvent - */ -class UserEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_type = ''; - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_pseudo_id = ''; - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - */ - protected $event_time = null; - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; - */ - protected $user_info = null; - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - */ - protected $direct_user_request = false; - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - */ - protected $session_id = ''; - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; - */ - protected $page_info = null; - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. - * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. - * - * Generated from protobuf field string attribution_token = 8; - */ - protected $attribution_token = ''; - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain - * a filter expression in [SearchRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string filter = 9; - */ - protected $filter = ''; - /** - * List of Documents associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; - */ - private $documents; - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; - */ - protected $panel = null; - /** - * Search API details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; - */ - protected $search_info = null; - /** - * CompleteQuery API details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; - */ - protected $completion_info = null; - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; - */ - protected $transaction_info = null; - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - */ - private $tag_ids; - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - */ - private $promotion_ids; - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - */ - private $attributes; - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; - */ - protected $media_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $event_type - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @type string $user_pseudo_id - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * @type \Google\Protobuf\Timestamp $event_time - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * @type \Google\Cloud\DiscoveryEngine\V1\UserInfo $user_info - * Information about the end user. - * @type bool $direct_user_request - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. - * @type string $session_id - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * as prefix. - * @type \Google\Cloud\DiscoveryEngine\V1\PageInfo $page_info - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * @type string $attribution_token - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. - * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. - * @type string $filter - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain - * a filter expression in [SearchRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * @type array<\Google\Cloud\DiscoveryEngine\V1\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents - * List of Documents associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] - * is desired. - * @type \Google\Cloud\DiscoveryEngine\V1\PanelInfo $panel - * Panel metadata associated with this user event. - * @type \Google\Cloud\DiscoveryEngine\V1\SearchInfo $search_info - * Search API details related to the event. - * This field should be set for `search` event. - * @type \Google\Cloud\DiscoveryEngine\V1\CompletionInfo $completion_info - * CompleteQuery API details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * @type \Google\Cloud\DiscoveryEngine\V1\TransactionInfo $transaction_info - * The transaction metadata (if any) associated with this user event. - * @type array|\Google\Protobuf\Internal\RepeatedField $tag_ids - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * @type \Google\Cloud\DiscoveryEngine\V1\MediaInfo $media_info - * Media-specific info. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; - * @return \Google\Cloud\DiscoveryEngine\V1\UserInfo|null - */ - public function getUserInfo() - { - return $this->user_info; - } - - public function hasUserInfo() - { - return isset($this->user_info); - } - - public function clearUserInfo() - { - unset($this->user_info); - } - - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.UserInfo user_info = 4; - * @param \Google\Cloud\DiscoveryEngine\V1\UserInfo $var - * @return $this - */ - public function setUserInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserInfo::class); - $this->user_info = $var; - - return $this; - } - - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - * @return bool - */ - public function getDirectUserRequest() - { - return $this->direct_user_request; - } - - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - * @param bool $var - * @return $this - */ - public function setDirectUserRequest($var) - { - GPBUtil::checkBool($var); - $this->direct_user_request = $var; - - return $this; - } - - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; - * @return \Google\Cloud\DiscoveryEngine\V1\PageInfo|null - */ - public function getPageInfo() - { - return $this->page_info; - } - - public function hasPageInfo() - { - return isset($this->page_info); - } - - public function clearPageInfo() - { - unset($this->page_info); - } - - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PageInfo page_info = 7; - * @param \Google\Cloud\DiscoveryEngine\V1\PageInfo $var - * @return $this - */ - public function setPageInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\PageInfo::class); - $this->page_info = $var; - - return $this; - } - - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. - * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. - * - * Generated from protobuf field string attribution_token = 8; - * @return string - */ - public function getAttributionToken() - { - return $this->attribution_token; - } - - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. - * The value must be one of: - * * [PredictResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. - * * [CompleteQueryResponse.attribution_token][] for events that are the - * result of - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [PredictResponse.attribution_token][] as a URL - * parameter to product K's page. When recording events on product K's page, - * log the [PredictResponse.attribution_token][] to this field. - * - * Generated from protobuf field string attribution_token = 8; - * @param string $var - * @return $this - */ - public function setAttributionToken($var) - { - GPBUtil::checkString($var, True); - $this->attribution_token = $var; - - return $this; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain - * a filter expression in [SearchRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string filter = 9; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain - * a filter expression in [SearchRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * - * Generated from protobuf field string filter = 9; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * List of Documents associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * List of Documents associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.DocumentInfo documents = 10; - * @param array<\Google\Cloud\DiscoveryEngine\V1\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\DocumentInfo::class); - $this->documents = $arr; - - return $this; - } - - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; - * @return \Google\Cloud\DiscoveryEngine\V1\PanelInfo|null - */ - public function getPanel() - { - return $this->panel; - } - - public function hasPanel() - { - return isset($this->panel); - } - - public function clearPanel() - { - unset($this->panel); - } - - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.PanelInfo panel = 11; - * @param \Google\Cloud\DiscoveryEngine\V1\PanelInfo $var - * @return $this - */ - public function setPanel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\PanelInfo::class); - $this->panel = $var; - - return $this; - } - - /** - * Search API details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; - * @return \Google\Cloud\DiscoveryEngine\V1\SearchInfo|null - */ - public function getSearchInfo() - { - return $this->search_info; - } - - public function hasSearchInfo() - { - return isset($this->search_info); - } - - public function clearSearchInfo() - { - unset($this->search_info); - } - - /** - * Search API details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchInfo search_info = 12; - * @param \Google\Cloud\DiscoveryEngine\V1\SearchInfo $var - * @return $this - */ - public function setSearchInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchInfo::class); - $this->search_info = $var; - - return $this; - } - - /** - * CompleteQuery API details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; - * @return \Google\Cloud\DiscoveryEngine\V1\CompletionInfo|null - */ - public function getCompletionInfo() - { - return $this->completion_info; - } - - public function hasCompletionInfo() - { - return isset($this->completion_info); - } - - public function clearCompletionInfo() - { - unset($this->completion_info); - } - - /** - * CompleteQuery API details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.CompletionInfo completion_info = 13; - * @param \Google\Cloud\DiscoveryEngine\V1\CompletionInfo $var - * @return $this - */ - public function setCompletionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\CompletionInfo::class); - $this->completion_info = $var; - - return $this; - } - - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; - * @return \Google\Cloud\DiscoveryEngine\V1\TransactionInfo|null - */ - public function getTransactionInfo() - { - return $this->transaction_info; - } - - public function hasTransactionInfo() - { - return isset($this->transaction_info); - } - - public function clearTransactionInfo() - { - unset($this->transaction_info); - } - - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.TransactionInfo transaction_info = 14; - * @param \Google\Cloud\DiscoveryEngine\V1\TransactionInfo $var - * @return $this - */ - public function setTransactionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\TransactionInfo::class); - $this->transaction_info = $var; - - return $this; - } - - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTagIds() - { - return $this->tag_ids; - } - - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTagIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tag_ids = $arr; - - return $this; - } - - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPromotionIds() - { - return $this->promotion_ids; - } - - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPromotionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->promotion_ids = $arr; - - return $this; - } - - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * ` traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\CustomAttribute::class); - $this->attributes = $arr; - - return $this; - } - - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; - * @return \Google\Cloud\DiscoveryEngine\V1\MediaInfo|null - */ - public function getMediaInfo() - { - return $this->media_info; - } - - public function hasMediaInfo() - { - return isset($this->media_info); - } - - public function clearMediaInfo() - { - unset($this->media_info); - } - - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1.MediaInfo media_info = 18; - * @param \Google\Cloud\DiscoveryEngine\V1\MediaInfo $var - * @return $this - */ - public function setMediaInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\MediaInfo::class); - $this->media_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php deleted file mode 100644 index 605cd52997db..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/UserInfo.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.discoveryengine.v1.UserInfo - */ -class UserInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - */ - protected $user_id = ''; - /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - */ - protected $user_agent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user_id - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type string $user_agent - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] - * is set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * User agent as included in the HTTP header. Required for getting - * [SearchResponse.sponsored_results][]. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php deleted file mode 100644 index f83195066deb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/proto/src/Google/Cloud/DiscoveryEngine/V1/WriteUserEventRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1.WriteUserEventRequest - */ -class WriteUserEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_event = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type \Google\Cloud\DiscoveryEngine\V1\UserEvent $user_event - * Required. User event to write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEventService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1\UserEvent|null - */ - public function getUserEvent() - { - return $this->user_event; - } - - public function hasUserEvent() - { - return isset($this->user_event); - } - - public function clearUserEvent() - { - unset($this->user_event); - } - - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1\UserEvent $var - * @return $this - */ - public function setUserEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserEvent::class); - $this->user_event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php deleted file mode 100644 index da43c877edc7..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/CompletionServiceClient/complete_query.php +++ /dev/null @@ -1,81 +0,0 @@ -setDataStore($formattedDataStore) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var CompleteQueryResponse $response */ - $response = $completionServiceClient->completeQuery($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedDataStore = CompletionServiceClient::dataStoreName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]' - ); - $query = '[QUERY]'; - - complete_query_sample($formattedDataStore, $query); -} -// [END discoveryengine_v1_generated_CompletionService_CompleteQuery_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php deleted file mode 100644 index 370b946c1b49..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/create_document.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->createDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($formattedParent, $documentId); -} -// [END discoveryengine_v1_generated_DocumentService_CreateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php deleted file mode 100644 index b3a222012a95..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/delete_document.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $documentServiceClient->deleteDocument($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentServiceClient::documentName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]', - '[DOCUMENT]' - ); - - delete_document_sample($formattedName); -} -// [END discoveryengine_v1_generated_DocumentService_DeleteDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php deleted file mode 100644 index f8ca37b1d223..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/get_document.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->getDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentServiceClient::documentName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]', - '[DOCUMENT]' - ); - - get_document_sample($formattedName); -} -// [END discoveryengine_v1_generated_DocumentService_GetDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php deleted file mode 100644 index 5956048420f9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/import_documents.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentServiceClient->importDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - - import_documents_sample($formattedParent); -} -// [END discoveryengine_v1_generated_DocumentService_ImportDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php deleted file mode 100644 index 5cfc05bf2067..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/list_documents.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentServiceClient->listDocuments($request); - - /** @var Document $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - - list_documents_sample($formattedParent); -} -// [END discoveryengine_v1_generated_DocumentService_ListDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php deleted file mode 100644 index 5763c00bd36c..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/purge_documents.php +++ /dev/null @@ -1,109 +0,0 @@ -setParent($formattedParent) - ->setFilter($filter); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentServiceClient->purgeDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PurgeDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - $filter = '[FILTER]'; - - purge_documents_sample($formattedParent, $filter); -} -// [END discoveryengine_v1_generated_DocumentService_PurgeDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php deleted file mode 100644 index fec89dedb0b0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/DocumentServiceClient/update_document.php +++ /dev/null @@ -1,59 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->updateDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END discoveryengine_v1_generated_DocumentService_UpdateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php deleted file mode 100644 index 7923a6496b81..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/create_schema.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->createSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schema $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schemaId = '[SCHEMA_ID]'; - - create_schema_sample($formattedParent, $schemaId); -} -// [END discoveryengine_v1_generated_SchemaService_CreateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php deleted file mode 100644 index 03c17c31e10d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/delete_schema.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->deleteSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SchemaServiceClient::schemaName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SCHEMA]' - ); - - delete_schema_sample($formattedName); -} -// [END discoveryengine_v1_generated_SchemaService_DeleteSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php deleted file mode 100644 index 6781fce462c6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/get_schema.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Schema $response */ - $response = $schemaServiceClient->getSchema($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SchemaServiceClient::schemaName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SCHEMA]' - ); - - get_schema_sample($formattedName); -} -// [END discoveryengine_v1_generated_SchemaService_GetSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php deleted file mode 100644 index aef951caa239..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/list_schemas.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $schemaServiceClient->listSchemas($request); - - /** @var Schema $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - - list_schemas_sample($formattedParent); -} -// [END discoveryengine_v1_generated_SchemaService_ListSchemas_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php deleted file mode 100644 index c424ef74ac30..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SchemaServiceClient/update_schema.php +++ /dev/null @@ -1,71 +0,0 @@ -setSchema($schema); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->updateSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schema $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END discoveryengine_v1_generated_SchemaService_UpdateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php deleted file mode 100644 index 86e6fefc96db..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/SearchServiceClient/search.php +++ /dev/null @@ -1,84 +0,0 @@ -setServingConfig($formattedServingConfig); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $searchServiceClient->search($request); - - /** @var SearchResult $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedServingConfig = SearchServiceClient::servingConfigName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SERVING_CONFIG]' - ); - - search_sample($formattedServingConfig); -} -// [END discoveryengine_v1_generated_SearchService_Search_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php deleted file mode 100644 index e8a5941651f6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/collect_user_event.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setUserEvent($userEvent); - - // Call the API and handle any network failures. - try { - /** @var HttpBody $response */ - $response = $userEventServiceClient->collectUserEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = '[USER_EVENT]'; - - collect_user_event_sample($formattedParent, $userEvent); -} -// [END discoveryengine_v1_generated_UserEventService_CollectUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php deleted file mode 100644 index 15b427ef0d8b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/import_user_events.php +++ /dev/null @@ -1,144 +0,0 @@ - Men > Jeans - * - * Retail-related values: - * - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * - * Media-related values: - * - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @param string $inlineSourceUserEventsUserPseudoId A unique identifier for tracking visitors. - * - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * @param string $formattedParent Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * Please see {@see UserEventServiceClient::dataStoreName()} for help formatting this field. - */ -function import_user_events_sample( - string $inlineSourceUserEventsEventType, - string $inlineSourceUserEventsUserPseudoId, - string $formattedParent -): void { - // Create a client. - $userEventServiceClient = new UserEventServiceClient(); - - // Prepare the request message. - $userEvent = (new UserEvent()) - ->setEventType($inlineSourceUserEventsEventType) - ->setUserPseudoId($inlineSourceUserEventsUserPseudoId); - $inlineSourceUserEvents = [$userEvent,]; - $inlineSource = (new InlineSource()) - ->setUserEvents($inlineSourceUserEvents); - $request = (new ImportUserEventsRequest()) - ->setInlineSource($inlineSource) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $userEventServiceClient->importUserEvents($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportUserEventsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $inlineSourceUserEventsEventType = '[EVENT_TYPE]'; - $inlineSourceUserEventsUserPseudoId = '[USER_PSEUDO_ID]'; - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - - import_user_events_sample( - $inlineSourceUserEventsEventType, - $inlineSourceUserEventsUserPseudoId, - $formattedParent - ); -} -// [END discoveryengine_v1_generated_UserEventService_ImportUserEvents_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php b/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php deleted file mode 100644 index 6cbcc36d4686..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/samples/V1/UserEventServiceClient/write_user_event.php +++ /dev/null @@ -1,117 +0,0 @@ - Men > Jeans - * - * Retail-related values: - * - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * - * Media-related values: - * - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @param string $userEventUserPseudoId A unique identifier for tracking visitors. - * - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an INVALID_ARGUMENT error is returned. - * - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - */ -function write_user_event_sample( - string $formattedParent, - string $userEventEventType, - string $userEventUserPseudoId -): void { - // Create a client. - $userEventServiceClient = new UserEventServiceClient(); - - // Prepare the request message. - $userEvent = (new UserEvent()) - ->setEventType($userEventEventType) - ->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - - // Call the API and handle any network failures. - try { - /** @var UserEvent $response */ - $response = $userEventServiceClient->writeUserEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEventEventType = '[EVENT_TYPE]'; - $userEventUserPseudoId = '[USER_PSEUDO_ID]'; - - write_user_event_sample($formattedParent, $userEventEventType, $userEventUserPseudoId); -} -// [END discoveryengine_v1_generated_UserEventService_WriteUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php deleted file mode 100644 index 12f9f36d94ff..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/CompletionServiceBaseClient.php +++ /dev/null @@ -1,280 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/completion_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/completion_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/completion_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/completion_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Completes the specified user input with keyword suggestions. - * - * The async variant is {@see self::completeQueryAsync()} . - * - * @example samples/V1/CompletionServiceClient/complete_query.php - * - * @param CompleteQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CompleteQueryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse - { - return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php deleted file mode 100644 index a0ef32e0ae3b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/DocumentServiceBaseClient.php +++ /dev/null @@ -1,584 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/document_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/document_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/document_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/document_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a branch - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted branch resource. - */ - public static function branchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('branch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted document resource. - */ - public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('document')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_collection_data_store_branch resource. - */ - public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_collection_data_store_branch_document resource. - */ - public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_data_store_branch resource. - */ - public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_data_store_branch_document resource. - */ - public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a [Document][google.cloud.discoveryengine.v1.Document]. - * - * The async variant is {@see self::createDocumentAsync()} . - * - * @example samples/V1/DocumentServiceClient/create_document.php - * - * @param CreateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Document][google.cloud.discoveryengine.v1.Document]. - * - * The async variant is {@see self::deleteDocumentAsync()} . - * - * @example samples/V1/DocumentServiceClient/delete_document.php - * - * @param DeleteDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); - } - - /** - * Gets a [Document][google.cloud.discoveryengine.v1.Document]. - * - * The async variant is {@see self::getDocumentAsync()} . - * - * @example samples/V1/DocumentServiceClient/get_document.php - * - * @param GetDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); - } - - /** - * Bulk import of multiple - * [Document][google.cloud.discoveryengine.v1.Document]s. Request processing - * may be synchronous. Non-existing items will be created. - * - * Note: It is possible for a subset of the - * [Document][google.cloud.discoveryengine.v1.Document]s to be successfully - * updated. - * - * The async variant is {@see self::importDocumentsAsync()} . - * - * @example samples/V1/DocumentServiceClient/import_documents.php - * - * @param ImportDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); - } - - /** - * Gets a list of [Document][google.cloud.discoveryengine.v1.Document]s. - * - * The async variant is {@see self::listDocumentsAsync()} . - * - * @example samples/V1/DocumentServiceClient/list_documents.php - * - * @param ListDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDocuments', $request, $callOptions); - } - - /** - * Permanently deletes all selected - * [Document][google.cloud.discoveryengine.v1.Document]s in a branch. - * - * This process is asynchronous. Depending on the number of - * [Document][google.cloud.discoveryengine.v1.Document]s to be deleted, this - * operation can take hours to complete. Before the delete operation - * completes, some [Document][google.cloud.discoveryengine.v1.Document]s might - * still be returned by - * [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] - * or - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. - * - * To get a list of the [Document][google.cloud.discoveryengine.v1.Document]s - * to be deleted, set - * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] - * to false. - * - * The async variant is {@see self::purgeDocumentsAsync()} . - * - * @example samples/V1/DocumentServiceClient/purge_documents.php - * - * @param PurgeDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function purgeDocuments(PurgeDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PurgeDocuments', $request, $callOptions)->wait(); - } - - /** - * Updates a [Document][google.cloud.discoveryengine.v1.Document]. - * - * The async variant is {@see self::updateDocumentAsync()} . - * - * @example samples/V1/DocumentServiceClient/update_document.php - * - * @param UpdateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php deleted file mode 100644 index b220578da52c..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SchemaServiceBaseClient.php +++ /dev/null @@ -1,496 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/schema_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/schema_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/schema_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/schema_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_schema resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $schema - * - * @return string The formatted project_location_collection_data_store_schema resource. - */ - public static function projectLocationCollectionDataStoreSchemaName(string $project, string $location, string $collection, string $dataStore, string $schema): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreSchema')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_schema resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $schema - * - * @return string The formatted project_location_data_store_schema resource. - */ - public static function projectLocationDataStoreSchemaName(string $project, string $location, string $dataStore, string $schema): string - { - return self::getPathTemplate('projectLocationDataStoreSchema')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a schema - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $schema - * - * @return string The formatted schema resource. - */ - public static function schemaName(string $project, string $location, string $dataStore, string $schema): string - { - return self::getPathTemplate('schema')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationCollectionDataStoreSchema: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationDataStoreSchema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} - * - schema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. - * - * The async variant is {@see self::createSchemaAsync()} . - * - * @example samples/V1/SchemaServiceClient/create_schema.php - * - * @param CreateSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSchema(CreateSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSchema', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. - * - * The async variant is {@see self::deleteSchemaAsync()} . - * - * @example samples/V1/SchemaServiceClient/delete_schema.php - * - * @param DeleteSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSchema(DeleteSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSchema', $request, $callOptions)->wait(); - } - - /** - * Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. - * - * The async variant is {@see self::getSchemaAsync()} . - * - * @example samples/V1/SchemaServiceClient/get_schema.php - * - * @param GetSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Schema - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSchema(GetSchemaRequest $request, array $callOptions = []): Schema - { - return $this->startApiCall('GetSchema', $request, $callOptions)->wait(); - } - - /** - * Gets a list of [Schema][google.cloud.discoveryengine.v1.Schema]s. - * - * The async variant is {@see self::listSchemasAsync()} . - * - * @example samples/V1/SchemaServiceClient/list_schemas.php - * - * @param ListSchemasRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSchemas(ListSchemasRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSchemas', $request, $callOptions); - } - - /** - * Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. - * - * The async variant is {@see self::updateSchemaAsync()} . - * - * @example samples/V1/SchemaServiceClient/update_schema.php - * - * @param UpdateSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSchema(UpdateSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSchema', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php deleted file mode 100644 index f961a6a73364..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/SearchServiceBaseClient.php +++ /dev/null @@ -1,354 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/search_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/search_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/search_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/search_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a branch - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted branch resource. - */ - public static function branchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('branch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_collection_data_store_branch resource. - */ - public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_collection_data_store_serving_config resource. - */ - public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_data_store_branch resource. - */ - public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_data_store_serving_config resource. - */ - public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted serving_config resource. - */ - public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('servingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} - * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Performs a search. - * - * The async variant is {@see self::searchAsync()} . - * - * @example samples/V1/SearchServiceClient/search.php - * - * @param SearchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function search(SearchRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('Search', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php deleted file mode 100644 index ad1c1cf77e1d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/BaseClient/UserEventServiceBaseClient.php +++ /dev/null @@ -1,456 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/user_event_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/user_event_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/user_event_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/user_event_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted document resource. - */ - public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('document')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_collection_data_store_branch_document resource. - */ - public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_data_store_branch_document resource. - */ - public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Writes a single user event from the browser. This uses a GET request to - * due to browser restriction of POST-ing to a 3rd party domain. - * - * This method is used only by the Discovery Engine API JavaScript pixel and - * Google Tag Manager. Users should not call this method directly. - * - * The async variant is {@see self::collectUserEventAsync()} . - * - * @example samples/V1/UserEventServiceClient/collect_user_event.php - * - * @param CollectUserEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HttpBody - * - * @throws ApiException Thrown if the API call fails. - */ - public function collectUserEvent(CollectUserEventRequest $request, array $callOptions = []): HttpBody - { - return $this->startApiCall('CollectUserEvent', $request, $callOptions)->wait(); - } - - /** - * Bulk import of User events. Request processing might be - * synchronous. Events that already exist are skipped. - * Use this method for backfilling historical user events. - * - * Operation.response is of type ImportResponse. Note that it is - * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. - * - * The async variant is {@see self::importUserEventsAsync()} . - * - * @example samples/V1/UserEventServiceClient/import_user_events.php - * - * @param ImportUserEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importUserEvents(ImportUserEventsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportUserEvents', $request, $callOptions)->wait(); - } - - /** - * Writes a single user event. - * - * The async variant is {@see self::writeUserEventAsync()} . - * - * @example samples/V1/UserEventServiceClient/write_user_event.php - * - * @param WriteUserEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserEvent - * - * @throws ApiException Thrown if the API call fails. - */ - public function writeUserEvent(WriteUserEventRequest $request, array $callOptions = []): UserEvent - { - return $this->startApiCall('WriteUserEvent', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php deleted file mode 100644 index 1b7ae376d481..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/Client/CompletionServiceClient.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.CompletionService' => [ - 'CompleteQuery' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\CompleteQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'data_store', - 'fieldAccessors' => [ - 'getDataStore', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php deleted file mode 100644 index 2d74bb63cdd9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/completion_service_rest_client_config.php +++ /dev/null @@ -1,134 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.CompletionService' => [ - 'CompleteQuery' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{data_store=projects/*/locations/*/dataStores/*}:completeQuery', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery', - ], - ], - 'placeholders' => [ - 'data_store' => [ - 'getters' => [ - 'getDataStore', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json deleted file mode 100644 index 677129d5b9a3..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_client_config.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1.DocumentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ImportDocuments": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListDocuments": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "PurgeDocuments": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "UpdateDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php deleted file mode 100644 index 4b86a66c0b39..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_descriptor_config.php +++ /dev/null @@ -1,123 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.DocumentService' => [ - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\PurgeDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\PurgeDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\ListDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'document.name', - 'fieldAccessors' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php deleted file mode 100644 index 83846f790df1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/document_service_rest_client_config.php +++ /dev/null @@ -1,251 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.DocumentService' => [ - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', - 'body' => 'document', - 'queryParams' => [ - 'document_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - 'body' => 'document', - ], - ], - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json deleted file mode 100644 index 1a3d7794fef9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1.SchemaService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListSchemas": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "UpdateSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php deleted file mode 100644 index 88a83b955135..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_descriptor_config.php +++ /dev/null @@ -1,106 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.SchemaService' => [ - 'CreateSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\Schema', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\CreateSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\DeleteSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\Schema', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\UpdateSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'schema.name', - 'fieldAccessors' => [ - 'getSchema', - 'getName', - ], - ], - ], - ], - 'GetSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\Schema', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSchemas' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSchemas', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\ListSchemasResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationCollectionDataStoreSchema' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationDataStoreSchema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', - 'schema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php deleted file mode 100644 index 9199afbb26aa..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/schema_service_rest_client_config.php +++ /dev/null @@ -1,213 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.SchemaService' => [ - 'CreateSchema' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/schemas', - 'body' => 'schema', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', - 'body' => 'schema', - 'queryParams' => [ - 'schema_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'schema_id', - ], - ], - 'DeleteSchema' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSchema' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/schemas/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSchemas' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/schemas', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSchema' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}', - 'body' => 'schema', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - 'body' => 'schema', - ], - ], - 'placeholders' => [ - 'schema.name' => [ - 'getters' => [ - 'getSchema', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json deleted file mode 100644 index 5e8091122348..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1.SearchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 5000, - "initial_rpc_timeout_millis": 5000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000, - "total_timeout_millis": 5000 - } - }, - "methods": { - "Search": { - "timeout_millis": 5000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php deleted file mode 100644 index 256f56b1135d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_descriptor_config.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.SearchService' => [ - 'Search' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\SearchResponse', - 'headerParams' => [ - [ - 'keyName' => 'serving_config', - 'fieldAccessors' => [ - 'getServingConfig', - ], - ], - ], - ], - 'templateMap' => [ - 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php deleted file mode 100644 index d35676a28f96..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/search_service_rest_client_config.php +++ /dev/null @@ -1,136 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.SearchService' => [ - 'Search' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'serving_config' => [ - 'getters' => [ - 'getServingConfig', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json deleted file mode 100644 index 2fc3ec52e009..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_client_config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1.UserEventService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CollectUserEvent": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ImportUserEvents": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "WriteUserEvent": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php deleted file mode 100644 index a69ef38de65c..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_descriptor_config.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.UserEventService' => [ - 'ImportUserEvents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportUserEventsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1\ImportUserEventsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CollectUserEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Api\HttpBody', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'WriteUserEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\UserEvent', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php deleted file mode 100644 index 260cb8d7e045..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/src/V1/resources/user_event_service_rest_client_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1.UserEventService' => [ - 'CollectUserEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportUserEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'WriteUserEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:write', - 'body' => 'user_event', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write', - 'body' => 'user_event', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php deleted file mode 100644 index 9bf8f0dbda3e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/CompletionServiceClientTest.php +++ /dev/null @@ -1,161 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CompletionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CompletionServiceClient($options); - } - - /** @test */ - public function completeQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteQueryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - $response = $gapicClient->completeQuery($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.CompletionService/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getDataStore(); - $this->assertProtobufEquals($formattedDataStore, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - try { - $gapicClient->completeQuery($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteQueryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - $response = $gapicClient->completeQueryAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.CompletionService/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getDataStore(); - $this->assertProtobufEquals($formattedDataStore, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php deleted file mode 100644 index dd2f0f7d8368..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/DocumentServiceClientTest.php +++ /dev/null @@ -1,732 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DocumentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DocumentServiceClient($options); - } - - /** @test */ - public function createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - $response = $gapicClient->createDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - try { - $gapicClient->createDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new DeleteDocumentRequest()) - ->setName($formattedName); - $gapicClient->deleteDocument($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new DeleteDocumentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new GetDocumentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new GetDocumentRequest()) - ->setName($formattedName); - try { - $gapicClient->getDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ImportDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ImportDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ListDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDocuments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ListDocumentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDocuments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $purgeCount = 575305851; - $expectedResponse = new PurgeDocumentsResponse(); - $expectedResponse->setPurgeCount($purgeCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/purgeDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $filter = 'filter-1274492040'; - $request = (new PurgeDocumentsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->purgeDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/PurgeDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function purgeDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $filter = 'filter-1274492040'; - $request = (new PurgeDocumentsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->purgeDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document); - $response = $gapicClient->updateDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document); - try { - $gapicClient->updateDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - $response = $gapicClient->createDocumentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.DocumentService/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php deleted file mode 100644 index 2ada41b6d931..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php +++ /dev/null @@ -1,669 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SchemaServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SchemaServiceClient($options); - } - - /** @test */ - public function createSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/CreateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $actualValue = $actualApiRequestObject->getSchemaId(); - $this->assertProtobufEquals($schemaId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new DeleteSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/DeleteSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new DeleteSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonSchema = 'jsonSchema-1150390056'; - $name2 = 'name2-1052831874'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new GetSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->getSchema($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/GetSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new GetSchemaRequest()) - ->setName($formattedName); - try { - $gapicClient->getSchema($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchemasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $schemasElement = new Schema(); - $schemas = [ - $schemasElement, - ]; - $expectedResponse = new ListSchemasResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSchemas($schemas); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ListSchemasRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSchemas($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/ListSchemas', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchemasExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ListSchemasRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSchemas($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $schema = new Schema(); - $request = (new UpdateSchemaRequest()) - ->setSchema($schema); - $response = $gapicClient->updateSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/UpdateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $schema = new Schema(); - $request = (new UpdateSchemaRequest()) - ->setSchema($schema); - $response = $gapicClient->updateSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSchemaAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchemaAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SchemaService/CreateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $actualValue = $actualApiRequestObject->getSchemaId(); - $this->assertProtobufEquals($schemaId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php deleted file mode 100644 index b2cf8e0c3e95..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/SearchServiceClientTest.php +++ /dev/null @@ -1,184 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SearchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SearchServiceClient($options); - } - - /** @test */ - public function searchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $attributionToken = 'attributionToken-729411015'; - $nextPageToken = ''; - $correctedQuery = 'correctedQuery107869074'; - $resultsElement = new SearchResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCorrectedQuery($correctedQuery); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - $response = $gapicClient->search($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SearchService/Search', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - try { - $gapicClient->search($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $attributionToken = 'attributionToken-729411015'; - $nextPageToken = ''; - $correctedQuery = 'correctedQuery107869074'; - $resultsElement = new SearchResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCorrectedQuery($correctedQuery); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - $response = $gapicClient->searchAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.SearchService/Search', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php deleted file mode 100644 index f090aa0a36a5..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1/tests/Unit/V1/Client/UserEventServiceClientTest.php +++ /dev/null @@ -1,401 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return UserEventServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new UserEventServiceClient($options); - } - - /** @test */ - public function collectUserEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $contentType = 'contentType831846208'; - $data = '-86'; - $expectedResponse = new HttpBody(); - $expectedResponse->setContentType($contentType); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->collectUserEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/CollectUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function collectUserEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - try { - $gapicClient->collectUserEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importUserEventsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importUserEventsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $joinedEventsCount = 720068705; - $unjoinedEventsCount = 512159846; - $expectedResponse = new ImportUserEventsResponse(); - $expectedResponse->setJoinedEventsCount($joinedEventsCount); - $expectedResponse->setUnjoinedEventsCount($unjoinedEventsCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importUserEventsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $inlineSource = new InlineSource(); - $inlineSourceUserEvents = []; - $inlineSource->setUserEvents($inlineSourceUserEvents); - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ImportUserEventsRequest()) - ->setInlineSource($inlineSource) - ->setParent($formattedParent); - $response = $gapicClient->importUserEvents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/ImportUserEvents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInlineSource(); - $this->assertProtobufEquals($inlineSource, $actualValue); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importUserEventsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importUserEventsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $inlineSource = new InlineSource(); - $inlineSourceUserEvents = []; - $inlineSource->setUserEvents($inlineSourceUserEvents); - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ImportUserEventsRequest()) - ->setInlineSource($inlineSource) - ->setParent($formattedParent); - $response = $gapicClient->importUserEvents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function writeUserEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $eventType = 'eventType984376767'; - $userPseudoId = 'userPseudoId-1850666040'; - $directUserRequest = false; - $sessionId = 'sessionId1661853540'; - $attributionToken = 'attributionToken-729411015'; - $filter = 'filter-1274492040'; - $expectedResponse = new UserEvent(); - $expectedResponse->setEventType($eventType); - $expectedResponse->setUserPseudoId($userPseudoId); - $expectedResponse->setDirectUserRequest($directUserRequest); - $expectedResponse->setSessionId($sessionId); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->writeUserEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/WriteUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeUserEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - try { - $gapicClient->writeUserEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function collectUserEventAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $contentType = 'contentType831846208'; - $data = '-86'; - $expectedResponse = new HttpBody(); - $expectedResponse->setContentType($contentType); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->collectUserEventAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1.UserEventService/CollectUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Common.php deleted file mode 100644 index 7c51f9521ad5107b49e9c1feb9d9e1640a908ea2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1919 zcmb7E&2G~`5XNbtbU~`{sS=l^1sWu3_9~2E`obU*gLuvDX?jO9Ot!C%dEeuU%rb6)OK*~V`ZWzg|=k|CS$|0zaAO>83 zJKPCCGZ#@}DI5b%h+r|K2@8R?59`nIyvH>2+XlyP)X#nsJRq04>%AZRPWIOGxxon zNbJKNoiIDhTZ3)!J3@mJEb^O>hKeUzszY@3yaDKGLvu^@UYRzB<9%8!IC|b0l6zFE z3{GdKRDsTv*fqR!fbn$Y|D$iUg!?a{ycBO%&@A56^WZTr+1Gl#DcPrZ#nmZ%o@|SJ zC1m@5@7CTdA{_G?oVnNF6t7`pM6Q|^4q0U1AS*GFjk9>&qE^*@ zJ2|YBhq*r+8UH0?vgZ8D!{y?zewi#Gg!!@2#x_}NWT}>MO>4!2OoM%$ENd8P%)V4z zwb#gs$l?H0x?Vwpwc(PhuTxMR(Un`4{g0UMI zoZMQh#`cFrA#wIan7YU`+x$naliCl9R4=HsIbm);S(Mp1#oBKd1(;QXjhSuEE$yWC zr9$psP{internalAddGeneratedFile( - ' -� - -d%6qe<82MwWIh{TIgj4X+^0po>5G%UNU#0V=85>1oMbUM2X>2{jw6oX{r zJE-viy!1s(d0_hzT3XTEd3Z_a#u`aC{}(L8Rjh)JSYfc;~v4j7K5 zP=bmO`)Rw)B&MPp^N>j!UR{ zAxRQk%MsBD!tjezKjaiAiYWNI$CDP1xZ)(_?}6JYZj&%!u=!$cJB_H~BEovZc0^fa z5gSaMdoLEC#VRg(YifBw8gDaFOhzR1YAm6W$4ba1q`Gd0slKQ>Qd!K)YB=7;71N{Z zUTAU^E19yh)iIV#r7~K{`qluw{>uAYi3FHdaW{31@vO!ZG!rn%k66$;%X2KNcNtGj zVR-H(8ZRmUYf0X<{A0zEjMQ~teFF`rk{d3W2<0yCvX(lI3nj{Zg6@~n>DtE<@)pjY zrcoLWF|om)oPwOy2JH_SRf%(wuX;`>D0qU1AXY4Ujy|_txUvkQdJR0`q38ILL?Ads z%?dJepV5i=vS)p`Y8^1r5c)CY2M_<-Ky?g_=(ek$wK^cdRc4@iqtL0TO{_We_O%(A zd~UUp9dW_ILFK~4e|O~AUpaR!vH!I+RomQM-`=n9ys2+BHn-~EO7o4(*6qyJ?OFj+ z&pr^gvGpHCmY2K#!2V612mY_WB&VhO2F`UeJl8!3=(;A+AA>Ve;?Y9iT^<;FJ>$lg OI&qe1{IZ972>k*h-Dxra diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php deleted file mode 100644 index 0bf27ce20b89..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/DocumentService.php +++ /dev/null @@ -1,69 +0,0 @@ -internalAddGeneratedFile( - ' -� -:google/cloud/discoveryengine/v1beta/document_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto7google/cloud/discoveryengine/v1beta/import_config.proto6google/cloud/discoveryengine/v1beta/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S -GetDocumentRequest= -name ( B/�A�A) -\'discoveryengine.googleapis.com/Document"| -ListDocumentsRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/Branch - page_size ( - -page_token ( "r -ListDocumentsResponse@ - documents ( 2-.google.cloud.discoveryengine.v1beta.Document -next_page_token ( "� -CreateDocumentRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/BranchD -document ( 2-.google.cloud.discoveryengine.v1beta.DocumentB�A - document_id ( B�A"t -UpdateDocumentRequestD -document ( 2-.google.cloud.discoveryengine.v1beta.DocumentB�A - allow_missing ("V -DeleteDocumentRequest= -name ( B/�A�A) -\'discoveryengine.googleapis.com/Document2� -DocumentService� - GetDocument7.google.cloud.discoveryengine.v1beta.GetDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZYW/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� - ListDocuments9.google.cloud.discoveryengine.v1beta.ListDocumentsRequest:.google.cloud.discoveryengine.v1beta.ListDocumentsResponse"�����I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZYW/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents�Aparent� -CreateDocument:.google.cloud.discoveryengine.v1beta.CreateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����"I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZc"W/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:document�Aparent,document,document_id� -UpdateDocument:.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"�����2R/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZl2`/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document� -DeleteDocument:.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.google.protobuf.Empty"�����*I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZY*W/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}�Aname� -ImportDocuments;.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.google.longrunning.Operation"�����"P/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Zc"^/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*�Az -;google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata� -PurgeDocuments:.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.google.longrunning.Operation"�����"O/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge:*Zb"]/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge:*�Ax -:google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse:google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadataR�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -\'com.google.cloud.discoveryengine.v1betaBDocumentServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/ImportConfig.php deleted file mode 100644 index 6188c67919fe80b3bd206e8b6d8d74d682f8f790..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3905 zcmdT{PjlNu6tA5&6R(>lRcYdeVJe(LTp%)a8UCmQh;1d&Ok$^w(*Z^^8d+L9TVzS> zN*MyvGj~p$xzW$S2Vl7H6*zO@&Z%#;l9SkO5aj^m;>_y3-~0dDeII@t90h1q-o_rL zR)`(BcOr*JSPrNk`nK=Ny{O;ERJQ$LKwL}}S#GxFR=X=}O}+ans4_pIHdf_jigfG4B>j49dM z42ZEsuTt?HkqapUf>`q(=cgQf+j{g?ks9IeD zJr`QTAiFP}z%~w`og$W9r+X4$qX~00T_tX&^^Zu>I-8C&>Xa=Qw#ulsywYpv=Oy&s z3r?A|DioD?Je9HWRK$3$+)B``fK+KxdoiUewJe66q`-;JJ6UuhsG^B^856DBiB`-G zFj>_wtyLnhoCwgsuJYN5Sn^>h`4B?Zt3V=HoR>d9g>9Q1#5^S}BSgF)3eAWTR?5jU zl|p^yx6QnC0~I;(n9M%HL#vdRbCp8*ryROgCxeF(P+0=-Cb||_Gz2p7J(F80T>;Tz z?Ybh&E8M)oi@tM7k`RJ89%DN+i38RElY77oF&v-8c7z8v(OhWtT+BshxTrW@MhgR* znGh;a>A-XdEnSX*#yp;lRf?!EaRx_ zARZ8=@0Gv3jFyG!Xv|m#e;I*@)I;;cbAi@PK@V}RiZwk=z(qZ#JO@c-NL*7m znHb>NDAtrr21ca@lond(kpXy3Pf}lb>Wa1dnV`;B9`HUvvyfcqRgt#(+t4_FZoYvk z;{zpH0p^G)aC26n8>|Dk5wNt2u3}z`>f+R-l*R)ystD4Yh@3ZmvG#(IOE04v zk9}xCM{oy&d`3_f-Y7HDE9hqAP5aD?KU01>C8G4*AyrY)rWmHzzVvZ+a%_(au-QcJX=M#J6faNYUsQAW>;^w%)NF~GY?w_`&vWa z(zWK|C20W_^;V;!?P;y<=I&xnnnRbj4tIAK^Jm!cyUFo{SM$G1j`i>J$XJ7WCriHS z$qPX|4&n#$e(v*!Vjhzh4Zp$${=`xT*ITmJjkR*ndoXeGLw=#DA2iyJw9aQ*Yg=z= zPxGtW@sg)B_>!kI($k+Bb!IQ)?@D4%*~wx_u{k|KPY`+r3WF14 diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php deleted file mode 100644 index 623f49eb0a27..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/PurgeConfig.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' -� -6google/cloud/discoveryengine/v1beta/purge_config.proto#google.cloud.discoveryengine.v1betagoogle/api/resource.protogoogle/protobuf/timestamp.proto"z -PurgeDocumentsRequest= -parent ( B-�A�A\' -%discoveryengine.googleapis.com/Branch -filter ( B�A -force ("q -PurgeDocumentsResponse - purge_count (B - purge_sample ( B,�A) -\'discoveryengine.googleapis.com/Document"� -PurgeDocumentsMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp - success_count ( - failure_count (B� -\'com.google.cloud.discoveryengine.v1betaBPurgeConfigProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php deleted file mode 100644 index 2b734d1177c2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/RecommendationService.php +++ /dev/null @@ -1,65 +0,0 @@ -internalAddGeneratedFile( - ' -� -@google/cloud/discoveryengine/v1beta/recommendation_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto4google/cloud/discoveryengine/v1beta/user_event.protogoogle/protobuf/struct.proto"� -RecommendRequestL -serving_config ( B4�A�A. -,discoveryengine.googleapis.com/ServingConfigG - -user_event ( 2..google.cloud.discoveryengine.v1beta.UserEventB�A - page_size ( -filter (  - validate_only (Q -params ( 2A.google.cloud.discoveryengine.v1beta.RecommendRequest.ParamsEntryZ - user_labels ( 2E.google.cloud.discoveryengine.v1beta.RecommendRequest.UserLabelsEntryE - ParamsEntry -key ( % -value ( 2.google.protobuf.Value:81 -UserLabelsEntry -key (  -value ( :8"� -RecommendResponse\\ -results ( 2K.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult -attribution_token (  - missing_ids (  - validate_only (� -RecommendationResult - -id ( ? -document ( 2-.google.cloud.discoveryengine.v1beta.Documentk -metadata ( 2Y.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.MetadataEntryG - MetadataEntry -key ( % -value ( 2.google.protobuf.Value:82� -RecommendationService� - Recommend5.google.cloud.discoveryengine.v1beta.RecommendRequest6.google.cloud.discoveryengine.v1beta.RecommendResponse"�����"W/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend:*Zj"e/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend:*R�Adiscoveryengine.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -\'com.google.cloud.discoveryengine.v1betaBRecommendationServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb�DISCOVERYENGINE�#Google.Cloud.DiscoveryEngine.V1Beta�#Google\\Cloud\\DiscoveryEngine\\V1beta�&Google::Cloud::DiscoveryEngine::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/GPBMetadata/Google/Cloud/Discoveryengine/V1Beta/Schema.php deleted file mode 100644 index 8d02f391ef0e71ecb6889af8f961fd3f0e552a2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1515 zcmb7E!EVz)5G5%@uoXf?LX?WbLJLhLuv@sf6cjgU$blv_RV9$6YO~%XTe)7#yRK9! ze*jlLfg_*7A8_Nq0re}G_1Z~ET2yk$dUoc`%-fmw>P<9?&=PL3ki|qXANNnN8ZjKj zLJ2AY+)oAr7Go-oA|9~V!no1FJDok;Y_#_tL8uf-Oqqj+LJR|D(?BG??Q==RF^f-F zIOHL-kJtN55nIv`J0eyFj!;OBn2ZQzxYc#v!M#ru@md*76W>wr#3S#1>? zOzpcI3E*K97nOB2H9(8k4i$?-5_kinternalAddGeneratedFile( - ' -� -8google/cloud/discoveryengine/v1beta/schema_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/discoveryengine/v1beta/schema.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"O -GetSchemaRequest; -name ( B-�A�A\' -%discoveryengine.googleapis.com/Schema"} -ListSchemasRequest@ -parent ( B0�A�A* -(discoveryengine.googleapis.com/DataStore - page_size ( - -page_token ( "l -ListSchemasResponse< -schemas ( 2+.google.cloud.discoveryengine.v1beta.Schema -next_page_token ( "� -CreateSchemaRequest@ -parent ( B0�A�A* -(discoveryengine.googleapis.com/DataStore@ -schema ( 2+.google.cloud.discoveryengine.v1beta.SchemaB�A - schema_id ( B�A"n -UpdateSchemaRequest@ -schema ( 2+.google.cloud.discoveryengine.v1beta.SchemaB�A - allow_missing ("R -DeleteSchemaRequest; -name ( B-�A�A\' -%discoveryengine.googleapis.com/Schema"x -CreateSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp"x -UpdateSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp"x -DeleteSchemaMetadata/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp2� - SchemaService� - GetSchema5.google.cloud.discoveryengine.v1beta.GetSchemaRequest+.google.cloud.discoveryengine.v1beta.Schema"�����EoP5sqZbkw%H_(00No*)G>fHcpVxjkYMZ$|k##C3}U~k|WtElB!@S>Pcop zkzA5;q6R6@qCoHMsn-_06zHj!#TLEvwtFei-isc3>b18$b>2Kul4U2gg!RSt&0f3BJjHOju4yq(Rg_{?sZ{rr zQn9@E9*X)-&ofv~={QcuV(W(G^jhmJ(>I($=JlD~F>SVfc(2Ir@sxmUn__W=w`_kE>KxOD*wuRy^c zx7V~xL-7MWz+cx*Uo&kpFm=oP2_Ex-($+1XA;R&!?VfD}reiByplTaz?Uo`i`QGcU zgKl}CL1q1)`m9<-;S`KHnl{H~wE_ckx z2TI`e*r;|z@mSFF?E7Rl2Y5aBt8s$+@~+v)+qT2K;MjgHH$2l2;!T1ZmdWg3GMP=2 zS*-#)&<{<=n@qIE!dyDFk#9?m#)i}FI`-*Jcq>@ZF?!vJoH59YI>yj=gBK~8?mjfb z)XBG6gG|}Pa$6h3mPh&~{PPxkIBlIt*My`>6{?O^s46Nnb18(^T@y>0hhJ1_=G~DG zZ60H-83sAraCu~d7e+Gt^zHByX?_zoAj4p|LW%5YBwAriLYb?f46zCpnE<>O!HRk$=#!gSn=s+s1($CzRV?=NmWS#{a=6kcf015@?gxmuI-FRD-nH)jLcRi%Yne&OT6u z{tMljwYf`s+S<`>upSH z!k3p3Iw^f0(qxaNH<{(j7b#$cDfICa-6jwUTILSGNJ*_kW!mfq%optO>6yY=NKo}= zelY{7VM_iGQX=#(y)3h*3v`) zYpB;pf|MmegfA_^Ok{IPD8rhkE9($@ zC{)Pn^>j5)JrYVum*E0l5`kwL*mP>Rf|MK@hZN&_tZlx;m02G&#Vf)WBp6)XGM+g1vsZ zTG93^_1)4&d9z$9E}oIjL9$q`=L_5TUrb8EY<_>Qx){&=F$PN~(Zo}j?K&++=bg_! zn!?j3psG6vxq2UF`EO|%7I&(}(wL!3uu$LM+A7uQ5Y@`|(BqE*9yP-Z-$p`-q=0O8 zY{z4o-oh8GuY34r3_CIIsHB8ldAP&ow{{df#-5wlOVX_#(r6P_PV|R#4X$tpj06OG zfEU_B;67hN>pn+B2YGN}d2ou0|B#IPL^wo)UT&Q8`1g{E#1-oOjoU~H=cd~aK#)#fRa z;Q6Kpc-u95{F2o~$IZL&6jIhXkF`wRo@qVLl+V%XC0MXAJG5gBI(`V7IXs5QHPM-G z!`Uzuv4iIIe1958g(bu0?MnkFqf3 zPS+Mhuj|au;*b!rI+A>QFc-E6qS=_NcML;CxT0&Kw3k-keANC>hJ{S>Qvlj3HZ4SX zPbd8JjFg9D)cZ_y#;El{2&^Sh=R7%P3g@Hu51lddU%dHGNUJ`q@UF;a!~jt?QQyfM zm&w@sjoGW#20HR#!ZPU!EVUiWa$aaXm*z((GBh8cqCJ6xvo zk`q&zFXC`EN87`xD>7W&-umN(mba7ktOpJ-kA~C2>Mn--F1OnBjDBF z$6)!S57PUvTHoK<$=9B0^+)C1-BMAjmGbptEz&!1IbVEIs@3zga(-KTykA0z@>Zo< zqn_yoyjMY)0aU5a9 zsg#|F2PnLm497cWA84TeK{FE|jh@Vl<12W`je7Jd_l#!Z|YoyNBXNklJ;!J}{;`$c#uu=O->71eJ}p(Y%9YX|;@7rl_O5R5 z*}GbdX744M<*Q=${#CTA5sv7GGkUSFfkS#e^#4!%eF2xt5ne7g2AIo@CJ{HK1AxdK5*E82F?KrkW3=&I?sj)1 zS9e=*bz7&oy3cOgXm=mL3th&HuaUDYDB%Y%@Fz}tVc;2zyBzle`J~gk)u%8g*W+y4!R(q|x*t6uE7s*p*n4cYq!S*jd~i z#;?c9a^89vWX0R^{i0Tnu+cY)?224pho4sA-n(?Tenp{7sS9&L7pBt1`dUWq#z8a5 zQm+)U{^>McQJt9I4DnHhkP5>FZTeXfv+o~Ie&>0nltJU4d8ibs(k}x@#X5WxlX}T0 zZB*=;zqd5~16Y!Jju}aP>I8mW8-Fwl6q46x@I&>^x~V)XHyD{&)JXpVDv~US`m{bP z&2Q!A=cUdRf$kv)!&&u%gm~PMLi8zJJ*c}iY59o6K zEnIdGC0(w;ipzNt^it8I4yP|jR9}$fOEA|DLL3bBiu}6;6`y+P5a$%DgE52YxINYV zS{X_@+=O!MMkK6PWw_>43>|@x@D@}VaTD)I-FZ=xG^ZkYDshtKOQ?z0ASCkAfymxP z$#i!rCY%KsRfP>4huyiuR>Kw;W!}Q3VleC%ftzN zc(@k~Xfjgr)-jqi38bVe`g^dL5Zn(EeAmUPP;RAh2ymib&?f6TR3y?U_GMV0iI1>e zPP__pwBKihOYZXSg&#{Ly8`o$I&JL2(nRl|c)Mu2Hp@KU^BGwV?o$6aZ%g8d!aQ8cz2yM57 zSI}2r)}z@Z(sng*grifw1Zl(_RZTIHwA~qTEL)j4&_6pRT)4;|b zC0IN)BNjo+OSpSMe*m*$#mYwW&HuJ;K==COE2PFUK0eGuWjAv=gyZF3rf$RoKFX>h zuXILJvqDq$B^<%oxN`hr8M3QTadMW%FD0mqCld0@fhM}{#Or}AgE7XTJ91?7;{B+I ztSRH7oTA-Sqv&g}$SHS2N18A>_sg;XGHa)Sb`37#xE`A~e#Wp05$YCPRzk+fF~A3z zIr$qZo2z1He6)7x_AH`Sj0S8mnK*7@;1uk5N1-@N(WH}Ad855j&3 zR$&7Lh`J1QVEYWRK7t`7jCjO{?YP@T6nf+F@HgtaEzYaYRRZTIL+?i!JpddP-7 zLV7+bc|M6dr4EifGC=eU1w9;~(%^0zF}D;)h_=uG1+2xt2G~QEJP3fmJwZ|EdI&c5 zD<5&&j>}x9Au*k*z;tStF`b8ZE8K1a0MB=$2tMG5bpd^-kiioG`7eyyKK5Y5T*m)y z;;4lK%&_a@&-iV(VAu5{#6c!)yK&$#Oadqznt_Lkx1holwl_n<+1Y|gjQfHxPL{J9 zFhm2_cWNl|C=MB+``pyFdx)hpi9DHzB|B#&gZ(rSlA|=v-!LZ zkQQR*tIblCvwIQ}%Bm#j;$HSZWKWl105hL~3dAtUwRSKb)e=nAd0 z+FC5y;KqnSUn}A{TU4iAZ@s6zWKh$p5SF=Zc`~`$@!c$r!}6uQGzTSrn5Pm+^Q4Rl z&kS(=5ycFp0ysdQ#wcRuhhQOeDJNywfJX6Z<<6hw+&|@YP#kAd1;;EtG zrHRn5%23QjkdG-|&I?LpTw(>WX!#0X$?q5<(gkp(#f{`Y-@5n5i(oO0Q8xhd=Nx$X zGV!LJiJQw#`pPSF@>=-C_~Q4!zRo=}3iYJ_JyGf2;!W=p&T3Rz=hE@itLERL=gGYC zjdR&7WkZYXQz0LFB-O`m;V>g8Z{i|@qHxT0g!xqtERLt&+{{GaxLZQutBE(4vL)(# zh1dDQ4~nR#hS|t?r>R8g%N{>6A7q5eNRKu%zs-Y1)f-Z|MHxvMcS}flEg@y3idbp2 zFZ`5~GWyOaY-haERCZM1vyJuR$AzPeU>W&Ip)bmxCyixx0h**E3b{s+soTFKE^Kdr59%=&7Gy&d{4>k@iW`6dUPHC}j=M9pe>mFuZ6 zbRCkD;l6SFv2sg_Gq2-4GSQ-V9C}tByF}RDm{@t5d!@E}SZzM6A3Uz_HFo#vKju~& za%Q%wVrI5#$;@1rbGW5u=8MG2(WCWnwpMlyAFjo~{&(&z1!vn5&$h<^ZCe?(7vvoO a&RRNUysc)|kr8+5cq=W{7google.cloud.discoveryengine.v1beta.BigQuerySource - */ -class BigQuerySource extends \Google\Protobuf\Internal\Message -{ - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_id = ''; - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - */ - protected $gcs_staging_dir = ''; - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1beta.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms to - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. - * - * Generated from protobuf field string data_schema = 6; - */ - protected $data_schema = ''; - protected $partition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Date $partition_date - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * @type string $project_id - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * @type string $dataset_id - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * @type string $table_id - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * @type string $gcs_staging_dir - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * @type string $data_schema - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1beta.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms to - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * - * Generated from protobuf field .google.type.Date partition_date = 5; - * @return \Google\Type\Date|null - */ - public function getPartitionDate() - { - return $this->readOneof(5); - } - - public function hasPartitionDate() - { - return $this->hasOneof(5); - } - - /** - * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. - * - * Generated from protobuf field .google.type.Date partition_date = 5; - * @param \Google\Type\Date $var - * @return $this - */ - public function setPartitionDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The project ID (can be project # or ID) that the BigQuery source is in with - * a length limit of 128 characters. If not specified, inherits the project - * ID from the parent request. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Required. The BigQuery data set to copy the data from with a length limit - * of 1,024 characters. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The BigQuery table to copy the data from with a length limit of - * 1,024 characters. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - * @return string - */ - public function getGcsStagingDir() - { - return $this->gcs_staging_dir; - } - - /** - * Intermediate Cloud Storage directory used for the import with a length - * limit of 2,000 characters. Can be specified if one wants to have the - * BigQuery export to a specific Cloud Storage directory. - * - * Generated from protobuf field string gcs_staging_dir = 4; - * @param string $var - * @return $this - */ - public function setGcsStagingDir($var) - { - GPBUtil::checkString($var, True); - $this->gcs_staging_dir = $var; - - return $this; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1beta.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms to - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. - * - * Generated from protobuf field string data_schema = 6; - * @return string - */ - public function getDataSchema() - { - return $this->data_schema; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for user event imports: - * * `user_event` (default): One - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. - * Supported values for document imports: - * * `document` (default): One - * [Document][google.cloud.discoveryengine.v1beta.Document] format per - * row. Each document must have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of - * [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] - * or - * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - * * `custom`: One custom data per row in arbitrary format that conforms to - * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. - * - * Generated from protobuf field string data_schema = 6; - * @param string $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkString($var, True); - $this->data_schema = $var; - - return $this; - } - - /** - * @return string - */ - public function getPartition() - { - return $this->whichOneof("partition"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php deleted file mode 100644 index 9d2ffc416c07..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CollectUserEventRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.discoveryengine.v1beta.CollectUserEventRequest - */ -class CollectUserEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_event = ''; - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for third-party - * requests. - * - * Generated from protobuf field optional string uri = 3; - */ - protected $uri = null; - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - */ - protected $ets = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type string $user_event - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * @type string $uri - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for third-party - * requests. - * @type int|string $ets - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEventService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserEvent() - { - return $this->user_event; - } - - /** - * Required. URL encoded UserEvent proto with a length limit of 2,000,000 - * characters. - * - * Generated from protobuf field string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserEvent($var) - { - GPBUtil::checkString($var, True); - $this->user_event = $var; - - return $this; - } - - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for third-party - * requests. - * - * Generated from protobuf field optional string uri = 3; - * @return string - */ - public function getUri() - { - return isset($this->uri) ? $this->uri : ''; - } - - public function hasUri() - { - return isset($this->uri); - } - - public function clearUri() - { - unset($this->uri); - } - - /** - * The URL including cgi-parameters but excluding the hash fragment with a - * length limit of 5,000 characters. This is often more useful than the - * referer URL, because many browsers only send the domain for third-party - * requests. - * - * Generated from protobuf field optional string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - * @return int|string - */ - public function getEts() - { - return isset($this->ets) ? $this->ets : 0; - } - - public function hasEts() - { - return isset($this->ets); - } - - public function clearEts() - { - unset($this->ets); - } - - /** - * The event timestamp in milliseconds. This prevents browser caching of - * otherwise identical get requests. The name is abbreviated to reduce the - * payload bytes. - * - * Generated from protobuf field optional int64 ets = 4; - * @param int|string $var - * @return $this - */ - public function setEts($var) - { - GPBUtil::checkInt64($var); - $this->ets = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php deleted file mode 100644 index f665058fde9f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.discoveryengine.v1beta.CompleteQueryRequest - */ -class CompleteQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $data_store = ''; - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * * `document-completable` - Using suggestions taken directly from - * user-imported document fields marked as completable. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][] dataStores. - * - * Generated from protobuf field string query_model = 3; - */ - protected $query_model = ''; - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - */ - protected $user_pseudo_id = ''; - /** - * Indicates if tail suggestions should be returned if there are no - * suggestions that match the full query. Even if set to true, if there are - * suggestions that match the full query, those are returned and no - * tail suggestions are returned. - * - * Generated from protobuf field bool include_tail_suggestions = 5; - */ - protected $include_tail_suggestions = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_store - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * @type string $query - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * @type string $query_model - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * * `document-completable` - Using suggestions taken directly from - * user-imported document fields marked as completable. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][] dataStores. - * @type string $user_pseudo_id - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type bool $include_tail_suggestions - * Indicates if tail suggestions should be returned if there are no - * suggestions that match the full query. Even if set to true, if there are - * suggestions that match the full query, those are returned and no - * tail suggestions are returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDataStore() - { - return $this->data_store; - } - - /** - * Required. The parent data store resource name for which the completion is - * performed, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. - * - * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataStore($var) - { - GPBUtil::checkString($var, True); - $this->data_store = $var; - - return $this; - } - - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The typeahead input used to fetch suggestions. Maximum length is - * 128 characters. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * * `document-completable` - Using suggestions taken directly from - * user-imported document fields marked as completable. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][] dataStores. - * - * Generated from protobuf field string query_model = 3; - * @return string - */ - public function getQueryModel() - { - return $this->query_model; - } - - /** - * Selects data model of query suggestions for serving. Currently supported - * values: - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * * `document-completable` - Using suggestions taken directly from - * user-imported document fields marked as completable. - * Default values: - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for - * [IndustryVertical.SITE_SEARCH][] dataStores. - * - * Generated from protobuf field string query_model = 3; - * @param string $var - * @return $this - */ - public function setQueryModel($var) - { - GPBUtil::checkString($var, True); - $this->query_model = $var; - - return $this; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 4; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - - /** - * Indicates if tail suggestions should be returned if there are no - * suggestions that match the full query. Even if set to true, if there are - * suggestions that match the full query, those are returned and no - * tail suggestions are returned. - * - * Generated from protobuf field bool include_tail_suggestions = 5; - * @return bool - */ - public function getIncludeTailSuggestions() - { - return $this->include_tail_suggestions; - } - - /** - * Indicates if tail suggestions should be returned if there are no - * suggestions that match the full query. Even if set to true, if there are - * suggestions that match the full query, those are returned and no - * tail suggestions are returned. - * - * Generated from protobuf field bool include_tail_suggestions = 5; - * @param bool $var - * @return $this - */ - public function setIncludeTailSuggestions($var) - { - GPBUtil::checkBool($var); - $this->include_tail_suggestions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php deleted file mode 100644 index 9b4cf95ca911..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1beta.CompleteQueryResponse - */ -class CompleteQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - */ - private $query_suggestions; - /** - * True if the returned suggestions are all tail suggestions. - * For tail matching to be triggered, include_tail_suggestions in the request - * must be true and there must be no suggestions that match the full query. - * - * Generated from protobuf field bool tail_match_triggered = 2; - */ - protected $tail_match_triggered = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $query_suggestions - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * @type bool $tail_match_triggered - * True if the returned suggestions are all tail suggestions. - * For tail matching to be triggered, include_tail_suggestions in the request - * must be true and there must be no suggestions that match the full query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuerySuggestions() - { - return $this->query_suggestions; - } - - /** - * Results of the matched query suggestions. The result list is ordered and - * the first result is a top suggestion. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuerySuggestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse\QuerySuggestion::class); - $this->query_suggestions = $arr; - - return $this; - } - - /** - * True if the returned suggestions are all tail suggestions. - * For tail matching to be triggered, include_tail_suggestions in the request - * must be true and there must be no suggestions that match the full query. - * - * Generated from protobuf field bool tail_match_triggered = 2; - * @return bool - */ - public function getTailMatchTriggered() - { - return $this->tail_match_triggered; - } - - /** - * True if the returned suggestions are all tail suggestions. - * For tail matching to be triggered, include_tail_suggestions in the request - * must be true and there must be no suggestions that match the full query. - * - * Generated from protobuf field bool tail_match_triggered = 2; - * @param bool $var - * @return $this - */ - public function setTailMatchTriggered($var) - { - GPBUtil::checkBool($var); - $this->tail_match_triggered = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php deleted file mode 100644 index 351eb29bf3ce..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompleteQueryResponse/QuerySuggestion.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion - */ -class QuerySuggestion extends \Google\Protobuf\Internal\Message -{ - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - */ - protected $suggestion = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $suggestion - * The suggestion for the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @return string - */ - public function getSuggestion() - { - return $this->suggestion; - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @param string $var - * @return $this - */ - public function setSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->suggestion = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QuerySuggestion::class, \Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse_QuerySuggestion::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php deleted file mode 100644 index d09e1ee7acdb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CompletionInfo.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.discoveryengine.v1beta.CompletionInfo - */ -class CompletionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. - * - * Generated from protobuf field string selected_suggestion = 1; - */ - protected $selected_suggestion = ''; - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - */ - protected $selected_position = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $selected_suggestion - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. - * @type int $selected_position - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] - * position, starting from 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. - * - * Generated from protobuf field string selected_suggestion = 1; - * @return string - */ - public function getSelectedSuggestion() - { - return $this->selected_suggestion; - } - - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. - * - * Generated from protobuf field string selected_suggestion = 1; - * @param string $var - * @return $this - */ - public function setSelectedSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->selected_suggestion = $var; - - return $this; - } - - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - * @return int - */ - public function getSelectedPosition() - { - return $this->selected_position; - } - - /** - * End user selected - * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] - * position, starting from 0. - * - * Generated from protobuf field int32 selected_position = 2; - * @param int $var - * @return $this - */ - public function setSelectedPosition($var) - { - GPBUtil::checkInt32($var); - $this->selected_position = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php deleted file mode 100644 index c3ff577a2b3d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateDocumentRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.discoveryengine.v1beta.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1beta.Document], which will become - * the final component of the - * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same - * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document_id = ''; - - /** - * @param string $parent Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Please see - * {@see DocumentServiceClient::branchName()} for help formatting this field. - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $document Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to - * create. - * @param string $documentId Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1beta.Document], which will become - * the final component of the - * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - * - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same - * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateDocumentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Document $document, string $documentId): self - { - return (new self()) - ->setParent($parent) - ->setDocument($document) - ->setDocumentId($documentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document - * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to - * create. - * @type string $document_id - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1beta.Document], which will become - * the final component of the - * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same - * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1beta.Document], which will become - * the final component of the - * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same - * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * Required. The ID to use for the - * [Document][google.cloud.discoveryengine.v1beta.Document], which will become - * the final component of the - * [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - * If the caller does not have permission to create the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * This field must be unique among all - * [Document][google.cloud.discoveryengine.v1beta.Document]s with the same - * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - * Otherwise, an `ALREADY_EXISTS` error is returned. - * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php deleted file mode 100644 index 5142fd3817cb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1beta.CreateSchemaMetadata - */ -class CreateSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php deleted file mode 100644 index 2433a108c8b0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CreateSchemaRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.discoveryengine.v1beta.CreateSchemaRequest - */ -class CreateSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema_id = ''; - - /** - * @param string $parent Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see - * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. - * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * create. - * @param string $schemaId Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. - * - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateSchemaRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema, string $schemaId): self - { - return (new self()) - ->setParent($parent) - ->setSchema($schema) - ->setSchemaId($schemaId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * create. - * @type string $schema_id - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * create. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); - $this->schema = $var; - - return $this; - } - - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSchemaId() - { - return $this->schema_id; - } - - /** - * Required. The ID to use for the - * [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the - * final component of the - * [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. - * This field should conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length - * limit of 63 characters. - * - * Generated from protobuf field string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSchemaId($var) - { - GPBUtil::checkString($var, True); - $this->schema_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php deleted file mode 100644 index bcb2514c5d68..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/CustomAttribute.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.discoveryengine.v1beta.CustomAttribute - */ -class CustomAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - */ - private $text; - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - */ - private $numbers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $text - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $numbers - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); - parent::__construct($data); - } - - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getText() - { - return $this->text; - } - - /** - * The textual values of this custom attribute. For example, `["yellow", - * "green"]` when the key is "color". - * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is - * returned. - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated string text = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setText($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text = $arr; - - return $this; - } - - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNumbers() - { - return $this->numbers; - } - - /** - * The numerical values of this custom attribute. For example, `[2.3, 15.4]` - * when the key is "lengths_cm". - * Exactly one of - * [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] - * or - * [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field repeated double numbers = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNumbers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->numbers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php deleted file mode 100644 index fd4914bd7778..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteDocumentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.discoveryengine.v1beta.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - * does not exist, a `NOT_FOUND` error is returned. Please see - * {@see DocumentServiceClient::documentName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteDocumentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - * does not exist, a `NOT_FOUND` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to delete the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php deleted file mode 100644 index abb7de3169fa..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata - */ -class DeleteSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php deleted file mode 100644 index 51e741330edf..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DeleteSchemaRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.discoveryengine.v1beta.DeleteSchemaRequest - */ -class DeleteSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see - * {@see SchemaServiceClient::schemaName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php deleted file mode 100644 index 1a0c1686f3a8..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document.php +++ /dev/null @@ -1,393 +0,0 @@ -google.cloud.discoveryengine.v1beta.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $id = ''; - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - */ - protected $schema_id = ''; - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; - */ - protected $content = null; - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - */ - protected $parent_document_id = ''; - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $derived_struct_data = null; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $struct_data - * The structured JSON data for the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * @type string $json_data - * The JSON string representation of the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * @type string $name - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * @type string $id - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * @type string $schema_id - * The identifier of the schema located in the same data store. - * @type \Google\Cloud\DiscoveryEngine\V1beta\Document\Content $content - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * @type string $parent_document_id - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * @type \Google\Protobuf\Struct $derived_struct_data - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Document::initOnce(); - parent::__construct($data); - } - - /** - * The structured JSON data for the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field .google.protobuf.Struct struct_data = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getStructData() - { - return $this->readOneof(4); - } - - public function hasStructData() - { - return $this->hasOneof(4); - } - - /** - * The structured JSON data for the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field .google.protobuf.Struct struct_data = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setStructData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The JSON string representation of the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field string json_data = 5; - * @return string - */ - public function getJsonData() - { - return $this->readOneof(5); - } - - public function hasJsonData() - { - return $this->hasOneof(5); - } - - /** - * The JSON string representation of the document. It should conform to the - * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - * `INVALID_ARGUMENT` error is thrown. - * - * Generated from protobuf field string json_data = 5; - * @param string $var - * @return $this - */ - public function setJsonData($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The full resource name of the document. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Immutable. The identifier of the document. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - * @return string - */ - public function getSchemaId() - { - return $this->schema_id; - } - - /** - * The identifier of the schema located in the same data store. - * - * Generated from protobuf field string schema_id = 3; - * @param string $var - * @return $this - */ - public function setSchemaId($var) - { - GPBUtil::checkString($var, True); - $this->schema_id = $var; - - return $this; - } - - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Document\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * The unstructured data linked to this document. Content must be set if this - * document is under a - * `CONTENT_REQUIRED` data store. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document.Content content = 10; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document\Content::class); - $this->content = $var; - - return $this; - } - - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - * @return string - */ - public function getParentDocumentId() - { - return $this->parent_document_id; - } - - /** - * The identifier of the parent document. Currently supports at most two level - * document hierarchy. - * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. - * - * Generated from protobuf field string parent_document_id = 7; - * @param string $var - * @return $this - */ - public function setParentDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->parent_document_id = $var; - - return $this; - } - - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Struct|null - */ - public function getDerivedStructData() - { - return $this->derived_struct_data; - } - - public function hasDerivedStructData() - { - return isset($this->derived_struct_data); - } - - public function clearDerivedStructData() - { - unset($this->derived_struct_data); - } - - /** - * Output only. This field is OUTPUT_ONLY. - * It contains derived data that are not in the original input document. - * - * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDerivedStructData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->derived_struct_data = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php deleted file mode 100644 index 11d04d2efbfb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Document/Content.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.discoveryengine.v1beta.Document.Content - */ -class Content extends \Google\Protobuf\Internal\Message -{ - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF, only native PDFs are supported for now) - * * `text/html` (HTML) - * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) - * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - */ - protected $mime_type = ''; - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $raw_bytes - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * @type string $uri - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * @type string $mime_type - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF, only native PDFs are supported for now) - * * `text/html` (HTML) - * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) - * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Document::initOnce(); - parent::__construct($data); - } - - /** - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field bytes raw_bytes = 2; - * @return string - */ - public function getRawBytes() - { - return $this->readOneof(2); - } - - public function hasRawBytes() - { - return $this->hasOneof(2); - } - - /** - * The content represented as a stream of bytes. The maximum length is - * 1,000,000 bytes (1 MB / ~0.95 MiB). - * Note: As with all `bytes` fields, this field is represented as pure - * binary in Protocol Buffers and base64-encoded string in JSON. For - * example, `abc123!?$*&()'-=@~` should be represented as - * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field bytes raw_bytes = 2; - * @param string $var - * @return $this - */ - public function setRawBytes($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * - * Generated from protobuf field string uri = 3; - * @return string - */ - public function getUri() - { - return $this->readOneof(3); - } - - public function hasUri() - { - return $this->hasOneof(3); - } - - /** - * The URI of the content. Only Cloud Storage URIs (e.g. - * `gs://bucket-name/path/to/file`) are supported. The maximum file size - * is 100 MB. - * - * Generated from protobuf field string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF, only native PDFs are supported for now) - * * `text/html` (HTML) - * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) - * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The MIME type of the content. Supported types: - * * `application/pdf` (PDF, only native PDFs are supported for now) - * * `text/html` (HTML) - * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) - * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * Generated from protobuf field string mime_type = 1; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Content::class, \Google\Cloud\DiscoveryEngine\V1beta\Document_Content::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php deleted file mode 100644 index ad0e888e6133..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/DocumentInfo.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.discoveryengine.v1beta.DocumentInfo - */ -class DocumentInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - */ - protected $quantity = null; - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - */ - private $promotion_ids; - protected $document_descriptor; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. - * @type string $name - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource - * full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * @type int $quantity - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->readOneof(1); - } - - public function hasId() - { - return $this->hasOneof(1); - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource - * full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->readOneof(2); - } - - public function hasName() - { - return $this->hasOneof(2); - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document] resource - * full name, of the form: - * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - * @return int - */ - public function getQuantity() - { - return isset($this->quantity) ? $this->quantity : 0; - } - - public function hasQuantity() - { - return isset($this->quantity); - } - - public function clearQuantity() - { - unset($this->quantity); - } - - /** - * Quantity of the Document associated with the user event. Defaults to 1. - * For example, this field will be 2 if two quantities of the same Document - * are involved in a `add-to-cart` event. - * Required for events of the following event types: - * * `add-to-cart` - * * `purchase` - * - * Generated from protobuf field optional int32 quantity = 3; - * @param int $var - * @return $this - */ - public function setQuantity($var) - { - GPBUtil::checkInt32($var); - $this->quantity = $var; - - return $this; - } - - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPromotionIds() - { - return $this->promotion_ids; - } - - /** - * The promotion IDs associated with this Document. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPromotionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->promotion_ids = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDocumentDescriptor() - { - return $this->whichOneof("document_descriptor"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php deleted file mode 100644 index 45a1309018d7..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GcsSource.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.discoveryengine.v1beta.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $input_uris; - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each - * document must - * have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` becomes a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. - * * `csv`: A CSV file with header conforming to the defined - * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - */ - protected $data_schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $input_uris - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * @type string $data_schema - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each - * document must - * have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` becomes a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. - * * `csv`: A CSV file with header conforming to the defined - * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputUris() - { - return $this->input_uris; - } - - /** - * Required. Cloud Storage URIs to input files. URI can be up to - * 2000 characters long. URIs can match the full object path (for example, - * `gs://bucket/directory/object.json`) or a pattern matching one or more - * files, such as `gs://bucket/directory/*.json`. - * A request can contain at most 100 files (or 100,000 files if `data_schema` - * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is - * `content`). - * - * Generated from protobuf field repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_uris = $arr; - - return $this; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each - * document must - * have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` becomes a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. - * * `csv`: A CSV file with header conforming to the defined - * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - * @return string - */ - public function getDataSchema() - { - return $this->data_schema; - } - - /** - * The schema to use when parsing the data from the source. - * Supported values for document imports: - * * `document` (default): One JSON - * [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each - * document must - * have a valid - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - * `input_uris` becomes a document, with the ID set to the first 128 - * bits of SHA256(URI) encoded as a hex string. - * * `custom`: One custom data JSON per row in arbitrary format that conforms - * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. - * * `csv`: A CSV file with header conforming to the defined - * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. - * Supported values for user even imports: - * * `user_event` (default): One JSON - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. - * - * Generated from protobuf field string data_schema = 2; - * @param string $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkString($var, True); - $this->data_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php deleted file mode 100644 index 3a69b7e806d6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetDocumentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.discoveryengine.v1beta.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * - * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - * does not exist, a `NOT_FOUND` error is returned. Please see - * {@see DocumentServiceClient::documentName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\GetDocumentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - * does not exist, a `NOT_FOUND` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full resource name of - * [Document][google.cloud.discoveryengine.v1beta.Document], such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. - * If the caller does not have permission to access the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - * does not exist, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php deleted file mode 100644 index 4e19a0e38020..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/GetSchemaRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.discoveryengine.v1beta.GetSchemaRequest - */ -class GetSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. Please see - * {@see SchemaServiceClient::schemaName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\GetSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php deleted file mode 100644 index feabb561b010..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were processed successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php deleted file mode 100644 index 053193a657b1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest.php +++ /dev/null @@ -1,505 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - */ - protected $error_config = null; - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - */ - protected $reconciliation_mode = 0; - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s - * have to be specified using - * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - */ - protected $auto_generate_ids = false; - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the - * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be - * set as valid strings conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - */ - protected $id_field = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $inline_source - * The Inline source for the input content for documents. - * @type \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $gcs_source - * Cloud Storage location for the input content. - * @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source - * BigQuery input source. - * @type string $parent - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config - * The desired location of errors incurred during the Import. - * @type int $reconciliation_mode - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * @type bool $auto_generate_ids - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s - * have to be specified using - * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. - * @type string $id_field - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the - * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be - * set as valid strings conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * The Inline source for the input content for documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource|null - */ - public function getInlineSource() - { - return $this->readOneof(2); - } - - public function hasInlineSource() - { - return $this->hasOneof(2); - } - - /** - * The Inline source for the input content for documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $var - * @return $this - */ - public function setInlineSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; - * @return \Google\Cloud\DiscoveryEngine\V1beta\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(3); - } - - public function hasGcsSource() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; - * @param \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\GcsSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; - * @return \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource|null - */ - public function getBigquerySource() - { - return $this->readOneof(4); - } - - public function hasBigquerySource() - { - return $this->hasOneof(4); - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; - * @param \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $var - * @return $this - */ - public function setBigquerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Requires create/update permission. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * The desired location of errors incurred during the Import. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - * @return int - */ - public function getReconciliationMode() - { - return $this->reconciliation_mode; - } - - /** - * The mode of reconciliation between existing documents and the documents to - * be imported. Defaults to - * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; - * @param int $var - * @return $this - */ - public function setReconciliationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\ReconciliationMode::class); - $this->reconciliation_mode = $var; - - return $this; - } - - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s - * have to be specified using - * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - * @return bool - */ - public function getAutoGenerateIds() - { - return $this->auto_generate_ids; - } - - /** - * Whether to automatically generate IDs for the documents if absent. - * If set to `true`, - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are - * automatically generated based on the hash of the payload, where IDs may not - * be consistent during multiple imports. In which case - * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] - * is highly recommended to avoid duplicate contents. If unset or set to - * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s - * have to be specified using - * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. - * - * Generated from protobuf field bool auto_generate_ids = 8; - * @param bool $var - * @return $this - */ - public function setAutoGenerateIds($var) - { - GPBUtil::checkBool($var); - $this->auto_generate_ids = $var; - - return $this; - } - - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the - * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be - * set as valid strings conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - * @return string - */ - public function getIdField() - { - return $this->id_field; - } - - /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. - * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the - * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be - * set as valid strings conform to - * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. - * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when - * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] - * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. - * If it is unset, a default value `_id` is used when importing from the - * allowed data sources. - * - * Generated from protobuf field string id_field = 9; - * @param string $var - * @return $this - */ - public function setIdField($var) - { - GPBUtil::checkString($var, True); - $this->id_field = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php deleted file mode 100644 index 432d9ace56e2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/InlineSource.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * Recommended max of 100 items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * Required. A list of documents to update/create. Each document must have a - * valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - * Recommended max of 100 items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->documents = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest_InlineSource::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php deleted file mode 100644 index 116a8bbc91eb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsRequest/ReconciliationMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode - */ -class ReconciliationMode -{ - /** - * Defaults to `INCREMENTAL`. - * - * Generated from protobuf enum RECONCILIATION_MODE_UNSPECIFIED = 0; - */ - const RECONCILIATION_MODE_UNSPECIFIED = 0; - /** - * Inserts new documents or updates existing documents. - * - * Generated from protobuf enum INCREMENTAL = 1; - */ - const INCREMENTAL = 1; - /** - * Calculates diff and replaces the entire document dataset. Existing - * documents may be deleted if they are not present in the source location. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::RECONCILIATION_MODE_UNSPECIFIED => 'RECONCILIATION_MODE_UNSPECIFIED', - self::INCREMENTAL => 'INCREMENTAL', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReconciliationMode::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest_ReconciliationMode::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php deleted file mode 100644 index e7b7a892fb75..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportDocumentsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportDocumentsResponse - */ -class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - */ - private $error_samples; - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - */ - protected $error_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples - * A sample of errors encountered while processing the request. - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config - * Echoes the destination for the complete errors in the request if set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorSamples() - { - return $this->error_samples; - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorSamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->error_samples = $arr; - - return $this; - } - - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * Echoes the destination for the complete errors in the request if set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php deleted file mode 100644 index 139a27318096..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportErrorConfig.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportErrorConfig - */ -class ImportErrorConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_prefix - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors are written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors are written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * - * Generated from protobuf field string gcs_prefix = 1; - * @return string - */ - public function getGcsPrefix() - { - return $this->readOneof(1); - } - - public function hasGcsPrefix() - { - return $this->hasOneof(1); - } - - /** - * Cloud Storage prefix for import errors. This must be an empty, - * existing Cloud Storage directory. Import errors are written to - * sharded files in this directory, one per line, as a JSON-encoded - * `google.rpc.Status` message. - * - * Generated from protobuf field string gcs_prefix = 1; - * @param string $var - * @return $this - */ - public function setGcsPrefix($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php deleted file mode 100644 index e3208f50df10..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata - */ -class ImportUserEventsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were processed successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php deleted file mode 100644 index 06c544d24154..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - */ -class ImportUserEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - */ - protected $error_config = null; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource $inline_source - * The Inline source for the input content for UserEvents. - * @type \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $gcs_source - * Cloud Storage location for the input content. - * @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source - * BigQuery input source. - * @type string $parent - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * The Inline source for the input content for UserEvents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource inline_source = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource|null - */ - public function getInlineSource() - { - return $this->readOneof(2); - } - - public function hasInlineSource() - { - return $this->hasOneof(2); - } - - /** - * The Inline source for the input content for UserEvents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource inline_source = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource $var - * @return $this - */ - public function setInlineSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest\InlineSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; - * @return \Google\Cloud\DiscoveryEngine\V1beta\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(3); - } - - public function hasGcsSource() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage location for the input content. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3; - * @param \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\GcsSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; - * @return \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource|null - */ - public function getBigquerySource() - { - return $this->readOneof(4); - } - - public function hasBigquerySource() - { - return $this->hasOneof(4); - } - - /** - * BigQuery input source. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4; - * @param \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $var - * @return $this - */ - public function setBigquerySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent DataStore resource name, of the form - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * The desired location of errors incurred during the Import. Cannot be set - * for inline user event imports. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php deleted file mode 100644 index 797d86927c35..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsRequest/InlineSource.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $user_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\UserEvent>|\Google\Protobuf\Internal\RepeatedField $user_events - * Required. A list of user events to import. Recommended max of 10k items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserEvents() - { - return $this->user_events; - } - - /** - * Required. A list of user events to import. Recommended max of 10k items. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\UserEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); - $this->user_events = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InlineSource::class, \Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsRequest_InlineSource::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php deleted file mode 100644 index e7fcdc3bd028..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ImportUserEventsResponse.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.discoveryengine.v1beta.ImportUserEventsResponse - */ -class ImportUserEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - */ - private $error_samples; - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - */ - protected $error_config = null; - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - */ - protected $joined_events_count = 0; - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - */ - protected $unjoined_events_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples - * A sample of errors encountered while processing the request. - * @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config - * Echoes the destination for the complete errors if this field was set in - * the request. - * @type int|string $joined_events_count - * Count of user events imported with complete existing Documents. - * @type int|string $unjoined_events_count - * Count of user events imported, but with Document information not found - * in the existing Branch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); - parent::__construct($data); - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorSamples() - { - return $this->error_samples; - } - - /** - * A sample of errors encountered while processing the request. - * - * Generated from protobuf field repeated .google.rpc.Status error_samples = 1; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorSamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->error_samples = $arr; - - return $this; - } - - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null - */ - public function getErrorConfig() - { - return $this->error_config; - } - - public function hasErrorConfig() - { - return isset($this->error_config); - } - - public function clearErrorConfig() - { - unset($this->error_config); - } - - /** - * Echoes the destination for the complete errors if this field was set in - * the request. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var - * @return $this - */ - public function setErrorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class); - $this->error_config = $var; - - return $this; - } - - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - * @return int|string - */ - public function getJoinedEventsCount() - { - return $this->joined_events_count; - } - - /** - * Count of user events imported with complete existing Documents. - * - * Generated from protobuf field int64 joined_events_count = 3; - * @param int|string $var - * @return $this - */ - public function setJoinedEventsCount($var) - { - GPBUtil::checkInt64($var); - $this->joined_events_count = $var; - - return $this; - } - - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - * @return int|string - */ - public function getUnjoinedEventsCount() - { - return $this->unjoined_events_count; - } - - /** - * Count of user events imported, but with Document information not found - * in the existing Branch. - * - * Generated from protobuf field int64 unjoined_events_count = 4; - * @param int|string $var - * @return $this - */ - public function setUnjoinedEventsCount($var) - { - GPBUtil::checkInt64($var); - $this->unjoined_events_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php deleted file mode 100644 index 0b49a3c8d689..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Interval.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.discoveryengine.v1beta.Interval - */ -class Interval extends \Google\Protobuf\Internal\Message -{ - protected $min; - protected $max; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $minimum - * Inclusive lower bound. - * @type float $exclusive_minimum - * Exclusive lower bound. - * @type float $maximum - * Inclusive upper bound. - * @type float $exclusive_maximum - * Exclusive upper bound. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); - parent::__construct($data); - } - - /** - * Inclusive lower bound. - * - * Generated from protobuf field double minimum = 1; - * @return float - */ - public function getMinimum() - { - return $this->readOneof(1); - } - - public function hasMinimum() - { - return $this->hasOneof(1); - } - - /** - * Inclusive lower bound. - * - * Generated from protobuf field double minimum = 1; - * @param float $var - * @return $this - */ - public function setMinimum($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Exclusive lower bound. - * - * Generated from protobuf field double exclusive_minimum = 2; - * @return float - */ - public function getExclusiveMinimum() - { - return $this->readOneof(2); - } - - public function hasExclusiveMinimum() - { - return $this->hasOneof(2); - } - - /** - * Exclusive lower bound. - * - * Generated from protobuf field double exclusive_minimum = 2; - * @param float $var - * @return $this - */ - public function setExclusiveMinimum($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Inclusive upper bound. - * - * Generated from protobuf field double maximum = 3; - * @return float - */ - public function getMaximum() - { - return $this->readOneof(3); - } - - public function hasMaximum() - { - return $this->hasOneof(3); - } - - /** - * Inclusive upper bound. - * - * Generated from protobuf field double maximum = 3; - * @param float $var - * @return $this - */ - public function setMaximum($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Exclusive upper bound. - * - * Generated from protobuf field double exclusive_maximum = 4; - * @return float - */ - public function getExclusiveMaximum() - { - return $this->readOneof(4); - } - - public function hasExclusiveMaximum() - { - return $this->hasOneof(4); - } - - /** - * Exclusive upper bound. - * - * Generated from protobuf field double exclusive_maximum = 4; - * @param float $var - * @return $this - */ - public function setExclusiveMaximum($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getMin() - { - return $this->whichOneof("min"); - } - - /** - * @return string - */ - public function getMax() - { - return $this->whichOneof("max"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php deleted file mode 100644 index 2257b17f5bff..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.discoveryengine.v1beta.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list - * [Document][google.cloud.discoveryengine.v1beta.Document]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to 100. The maximum allowed value is - * 1000. Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * - * If the caller does not have permission to list - * [Document][google.cloud.discoveryengine.v1beta.Document]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. Please see - * {@see DocumentServiceClient::branchName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\ListDocumentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list - * [Document][google.cloud.discoveryengine.v1beta.Document]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * @type int $page_size - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to 100. The maximum allowed value is - * 1000. Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * @type string $page_token - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list - * [Document][google.cloud.discoveryengine.v1beta.Document]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent branch resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * Use `default_branch` as the branch ID, to list documents under the default - * branch. - * If the caller does not have permission to list - * [Document][google.cloud.discoveryengine.v1beta.Document]s under this - * branch, regardless of whether or not this branch exists, a - * `PERMISSION_DENIED` error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to 100. The maximum allowed value is - * 1000. Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to 100. The maximum allowed value is - * 1000. Values above 1000 will be coerced to 1000. - * If this field is negative, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token - * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], - * received from a previous - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php deleted file mode 100644 index 1d2842848b1d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListDocumentsResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1beta.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; - */ - private $documents; - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * The [Document][google.cloud.discoveryengine.v1beta.Document]s. - * @type string $next_page_token - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The [Document][google.cloud.discoveryengine.v1beta.Document]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Document documents = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php deleted file mode 100644 index d1de3973ccbd..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.discoveryengine.v1beta.ListSchemasRequest - */ -class ListSchemasRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s - * to return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. Please see - * {@see SchemaServiceClient::dataStoreName()} for help formatting this field. - * - * @return \Google\Cloud\DiscoveryEngine\V1beta\ListSchemasRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type int $page_size - * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s - * to return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent data store resource name, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s - * to return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s - * to return. The service may return fewer than this value. - * If unspecified, at most 100 - * [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php deleted file mode 100644 index f99765b34761..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/ListSchemasResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1beta.ListSchemasResponse - */ -class ListSchemasResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; - */ - private $schemas; - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas - * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. - * @type string $next_page_token - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchemas() - { - return $this->schemas; - } - - /** - * The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Schema schemas = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Schema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchemas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); - $this->schemas = $arr; - - return $this; - } - - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php deleted file mode 100644 index 4a42fda0d13f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/MediaInfo.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.discoveryengine.v1beta.MediaInfo - */ -class MediaInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then - * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - * should be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - */ - protected $media_progress_duration = null; - /** - * Media progress should be computed using only the - * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - */ - protected $media_progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $media_progress_duration - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then - * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - * should be set to 90. - * @type float $media_progress_percentage - * Media progress should be computed using only the - * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then - * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - * should be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMediaProgressDuration() - { - return $this->media_progress_duration; - } - - public function hasMediaProgressDuration() - { - return isset($this->media_progress_duration); - } - - public function clearMediaProgressDuration() - { - unset($this->media_progress_duration); - } - - /** - * The media progress time in seconds, if applicable. - * For example, if the end user has finished 90 seconds of a playback video, - * then - * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - * should be set to 90. - * - * Generated from protobuf field .google.protobuf.Duration media_progress_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMediaProgressDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->media_progress_duration = $var; - - return $this; - } - - /** - * Media progress should be computed using only the - * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - * @return float - */ - public function getMediaProgressPercentage() - { - return isset($this->media_progress_percentage) ? $this->media_progress_percentage : 0.0; - } - - public function hasMediaProgressPercentage() - { - return isset($this->media_progress_percentage); - } - - public function clearMediaProgressPercentage() - { - unset($this->media_progress_percentage); - } - - /** - * Media progress should be computed using only the - * [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] - * relative to the media total length. - * This value must be between `[0, 1.0]` inclusive. - * If this is not a playback or the progress cannot be computed (e.g. ongoing - * livestream), this field should be unset. - * - * Generated from protobuf field optional float media_progress_percentage = 2; - * @param float $var - * @return $this - */ - public function setMediaProgressPercentage($var) - { - GPBUtil::checkFloat($var); - $this->media_progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php deleted file mode 100644 index 8d5046740830..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PageInfo.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.discoveryengine.v1beta.PageInfo - */ -class PageInfo extends \Google\Protobuf\Internal\Message -{ - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageview_id` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - */ - protected $pageview_id = ''; - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_category = 2; - */ - protected $page_category = ''; - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - */ - protected $uri = ''; - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - */ - protected $referrer_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pageview_id - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageview_id` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * @type string $page_category - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type string $uri - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * @type string $referrer_uri - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageview_id` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - * @return string - */ - public function getPageviewId() - { - return $this->pageview_id; - } - - /** - * A unique ID of a web page view. - * This should be kept the same for all user events triggered from the same - * pageview. For example, an item detail page view could trigger multiple - * events as the user is browsing the page. The `pageview_id` property should - * be kept the same for all these events so that they can be grouped together - * properly. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. - * - * Generated from protobuf field string pageview_id = 1; - * @param string $var - * @return $this - */ - public function setPageviewId($var) - { - GPBUtil::checkString($var, True); - $this->pageview_id = $var; - - return $this; - } - - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_category = 2; - * @return string - */ - public function getPageCategory() - { - return $this->page_category; - } - - /** - * The most specific category associated with a category page. - * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with - * other character(s). - * Category pages include special pages such as sales or promotions. For - * instance, a special sale page may have the category hierarchy: - * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. - * Required for `view-category-page` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_category = 2; - * @param string $var - * @return $this - */ - public function setPageCategory($var) - { - GPBUtil::checkString($var, True); - $this->page_category = $var; - - return $this; - } - - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Complete URL (window.location.href) of the user's current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. Maximum length 5,000 - * characters. - * - * Generated from protobuf field string uri = 3; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - * @return string - */ - public function getReferrerUri() - { - return $this->referrer_uri; - } - - /** - * The referrer URL of the current page. - * When using the client side event reporting with JavaScript pixel and Google - * Tag Manager, this value is filled in automatically. However, some browser - * privacy restrictions may cause this field to be empty. - * - * Generated from protobuf field string referrer_uri = 4; - * @param string $var - * @return $this - */ - public function setReferrerUri($var) - { - GPBUtil::checkString($var, True); - $this->referrer_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php deleted file mode 100644 index 4e6f18a8604f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PanelInfo.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.discoveryengine.v1beta.PanelInfo - */ -class PanelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $panel_id = ''; - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] - * must also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - */ - protected $panel_position = null; - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - */ - protected $total_panels = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $panel_id - * Required. The panel ID. - * @type string $display_name - * The display name of the panel. - * @type int $panel_position - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] - * must also be set. - * @type int $total_panels - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] - * is set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPanelId() - { - return $this->panel_id; - } - - /** - * Required. The panel ID. - * - * Generated from protobuf field string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPanelId($var) - { - GPBUtil::checkString($var, True); - $this->panel_id = $var; - - return $this; - } - - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the panel. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] - * must also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - * @return int - */ - public function getPanelPosition() - { - return isset($this->panel_position) ? $this->panel_position : 0; - } - - public function hasPanelPosition() - { - return isset($this->panel_position); - } - - public function clearPanelPosition() - { - unset($this->panel_position); - } - - /** - * The ordered position of the panel, if shown to the user with other panels. - * If set, then - * [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] - * must also be set. - * - * Generated from protobuf field optional int32 panel_position = 4; - * @param int $var - * @return $this - */ - public function setPanelPosition($var) - { - GPBUtil::checkInt32($var); - $this->panel_position = $var; - - return $this; - } - - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - * @return int - */ - public function getTotalPanels() - { - return isset($this->total_panels) ? $this->total_panels : 0; - } - - public function hasTotalPanels() - { - return isset($this->total_panels); - } - - public function clearTotalPanels() - { - unset($this->total_panels); - } - - /** - * The total number of panels, including this one, shown to the user. - * Must be set if - * [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] - * is set. - * - * Generated from protobuf field optional int32 total_panels = 5; - * @param int $var - * @return $this - */ - public function setTotalPanels($var) - { - GPBUtil::checkInt32($var); - $this->total_panels = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php deleted file mode 100644 index 3207bdbf6122..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata - */ -class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * @type int|string $success_count - * Count of entries that were deleted successfully. - * @type int|string $failure_count - * Count of entries that encountered errors while processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of entries that were deleted successfully. - * - * Generated from protobuf field int64 success_count = 3; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of entries that encountered errors while processing. - * - * Generated from protobuf field int64 failure_count = 4; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php deleted file mode 100644 index 99adaad192e5..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest - */ -class PurgeDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * @type string $filter - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * @type bool $force - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. Filter matching documents to purge. Only currently supported - * value is - * `*` (all items). - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Actually performs the purge. If `force` is set to false, return the - * expected purge count without deleting any documents. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php deleted file mode 100644 index fd207e22e4f6..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/PurgeDocumentsResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse - */ -class PurgeDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - */ - protected $purge_count = 0; - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - */ - private $purge_sample; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $purge_count - * The total count of documents purged as a result of the operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $purge_sample - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); - parent::__construct($data); - } - - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - * @return int|string - */ - public function getPurgeCount() - { - return $this->purge_count; - } - - /** - * The total count of documents purged as a result of the operation. - * - * Generated from protobuf field int64 purge_count = 1; - * @param int|string $var - * @return $this - */ - public function setPurgeCount($var) - { - GPBUtil::checkInt64($var); - $this->purge_count = $var; - - return $this; - } - - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPurgeSample() - { - return $this->purge_sample; - } - - /** - * A sample of document names that will be deleted. Only populated if `force` - * is set to false. A max of 100 names will be returned and the names are - * chosen at random. - * - * Generated from protobuf field repeated string purge_sample = 2 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPurgeSample($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->purge_sample = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php deleted file mode 100644 index e433ed62c9ae..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendRequest.php +++ /dev/null @@ -1,565 +0,0 @@ -google.cloud.discoveryengine.v1beta.RecommendRequest - */ -class RecommendRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full resource name of the format: - * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` - * Before you can request recommendations from your model, you must create at - * least one serving config for it. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $serving_config = ''; - /** - * Required. Context about the user, what they are looking at and what action - * they took to trigger the Recommend request. Note that this user event - * detail won't be ingested to userEvent logs. Thus, a separate userEvent - * write request is required for event logging. - * Don't set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * or - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * to the same fixed ID for different users. If you are trying to receive - * non-personalized recommendations (not recommended; this can negatively - * impact model performance), instead set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * to a random unique ID and leave - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * unset. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_event = null; - /** - * Maximum number of results to return. Set this property - * to the number of recommendation results needed. If zero, the service will - * choose a reasonable default. The maximum allowed value is 100. Values - * above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Filter for restricting recommendation results with a length limit of 5,000 - * characters. Currently, only filter expressions on the `filter_tags` - * attribute is supported. - * Examples: - * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` - * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` - * If your filter blocks all results, the API will return generic - * (unfiltered) popular Documents. If you only want results strictly matching - * the filters, set `strictFiltering` to True in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] - * to receive empty results instead. - * Note that the API will never return - * [Document][google.cloud.discoveryengine.v1beta.Document]s with - * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Use validate only mode for this recommendation query. If set to true, a - * fake model will be used that returns arbitrary Document IDs. - * Note that the validate only mode should only be used for testing the API, - * or if the model is not ready. - * - * Generated from protobuf field bool validate_only = 5; - */ - protected $validate_only = false; - /** - * Additional domain specific parameters for the recommendations. - * Allowed values: - * * `returnDocument`: Boolean. If set to true, the associated Document - * object will be returned in - * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. - * * `returnScore`: Boolean. If set to true, the recommendation 'score' - * corresponding to each returned Document will be set in - * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. - * The given 'score' indicates the probability of a Document conversion - * given the user's context and history. - * * `strictFiltering`: Boolean. True by default. If set to false, the service - * will return generic (unfiltered) popular Documents instead of empty if - * your filter blocks all recommendation results. - * * `diversityLevel`: String. Default empty. If set to be non-empty, then - * it needs to be one of: - * * `no-diversity` - * * `low-diversity` - * * `medium-diversity` - * * `high-diversity` - * * `auto-diversity` - * This gives request-level control and adjusts recommendation results - * based on Document category. - * - * Generated from protobuf field map params = 6; - */ - private $params; - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 8; - */ - private $user_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serving_config - * Required. Full resource name of the format: - * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` - * Before you can request recommendations from your model, you must create at - * least one serving config for it. - * @type \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $user_event - * Required. Context about the user, what they are looking at and what action - * they took to trigger the Recommend request. Note that this user event - * detail won't be ingested to userEvent logs. Thus, a separate userEvent - * write request is required for event logging. - * Don't set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * or - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * to the same fixed ID for different users. If you are trying to receive - * non-personalized recommendations (not recommended; this can negatively - * impact model performance), instead set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * to a random unique ID and leave - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * unset. - * @type int $page_size - * Maximum number of results to return. Set this property - * to the number of recommendation results needed. If zero, the service will - * choose a reasonable default. The maximum allowed value is 100. Values - * above 100 will be coerced to 100. - * @type string $filter - * Filter for restricting recommendation results with a length limit of 5,000 - * characters. Currently, only filter expressions on the `filter_tags` - * attribute is supported. - * Examples: - * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` - * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` - * If your filter blocks all results, the API will return generic - * (unfiltered) popular Documents. If you only want results strictly matching - * the filters, set `strictFiltering` to True in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] - * to receive empty results instead. - * Note that the API will never return - * [Document][google.cloud.discoveryengine.v1beta.Document]s with - * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. - * @type bool $validate_only - * Use validate only mode for this recommendation query. If set to true, a - * fake model will be used that returns arbitrary Document IDs. - * Note that the validate only mode should only be used for testing the API, - * or if the model is not ready. - * @type array|\Google\Protobuf\Internal\MapField $params - * Additional domain specific parameters for the recommendations. - * Allowed values: - * * `returnDocument`: Boolean. If set to true, the associated Document - * object will be returned in - * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. - * * `returnScore`: Boolean. If set to true, the recommendation 'score' - * corresponding to each returned Document will be set in - * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. - * The given 'score' indicates the probability of a Document conversion - * given the user's context and history. - * * `strictFiltering`: Boolean. True by default. If set to false, the service - * will return generic (unfiltered) popular Documents instead of empty if - * your filter blocks all recommendation results. - * * `diversityLevel`: String. Default empty. If set to be non-empty, then - * it needs to be one of: - * * `no-diversity` - * * `low-diversity` - * * `medium-diversity` - * * `high-diversity` - * * `auto-diversity` - * This gives request-level control and adjusts recommendation results - * based on Document category. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full resource name of the format: - * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` - * Before you can request recommendations from your model, you must create at - * least one serving config for it. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServingConfig() - { - return $this->serving_config; - } - - /** - * Required. Full resource name of the format: - * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` - * Before you can request recommendations from your model, you must create at - * least one serving config for it. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServingConfig($var) - { - GPBUtil::checkString($var, True); - $this->serving_config = $var; - - return $this; - } - - /** - * Required. Context about the user, what they are looking at and what action - * they took to trigger the Recommend request. Note that this user event - * detail won't be ingested to userEvent logs. Thus, a separate userEvent - * write request is required for event logging. - * Don't set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * or - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * to the same fixed ID for different users. If you are trying to receive - * non-personalized recommendations (not recommended; this can negatively - * impact model performance), instead set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * to a random unique ID and leave - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * unset. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\UserEvent|null - */ - public function getUserEvent() - { - return $this->user_event; - } - - public function hasUserEvent() - { - return isset($this->user_event); - } - - public function clearUserEvent() - { - unset($this->user_event); - } - - /** - * Required. Context about the user, what they are looking at and what action - * they took to trigger the Recommend request. Note that this user event - * detail won't be ingested to userEvent logs. Thus, a separate userEvent - * write request is required for event logging. - * Don't set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * or - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * to the same fixed ID for different users. If you are trying to receive - * non-personalized recommendations (not recommended; this can negatively - * impact model performance), instead set - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * to a random unique ID and leave - * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - * unset. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $var - * @return $this - */ - public function setUserEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); - $this->user_event = $var; - - return $this; - } - - /** - * Maximum number of results to return. Set this property - * to the number of recommendation results needed. If zero, the service will - * choose a reasonable default. The maximum allowed value is 100. Values - * above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results to return. Set this property - * to the number of recommendation results needed. If zero, the service will - * choose a reasonable default. The maximum allowed value is 100. Values - * above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Filter for restricting recommendation results with a length limit of 5,000 - * characters. Currently, only filter expressions on the `filter_tags` - * attribute is supported. - * Examples: - * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` - * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` - * If your filter blocks all results, the API will return generic - * (unfiltered) popular Documents. If you only want results strictly matching - * the filters, set `strictFiltering` to True in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] - * to receive empty results instead. - * Note that the API will never return - * [Document][google.cloud.discoveryengine.v1beta.Document]s with - * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter for restricting recommendation results with a length limit of 5,000 - * characters. Currently, only filter expressions on the `filter_tags` - * attribute is supported. - * Examples: - * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` - * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` - * If your filter blocks all results, the API will return generic - * (unfiltered) popular Documents. If you only want results strictly matching - * the filters, set `strictFiltering` to True in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] - * to receive empty results instead. - * Note that the API will never return - * [Document][google.cloud.discoveryengine.v1beta.Document]s with - * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Use validate only mode for this recommendation query. If set to true, a - * fake model will be used that returns arbitrary Document IDs. - * Note that the validate only mode should only be used for testing the API, - * or if the model is not ready. - * - * Generated from protobuf field bool validate_only = 5; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Use validate only mode for this recommendation query. If set to true, a - * fake model will be used that returns arbitrary Document IDs. - * Note that the validate only mode should only be used for testing the API, - * or if the model is not ready. - * - * Generated from protobuf field bool validate_only = 5; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Additional domain specific parameters for the recommendations. - * Allowed values: - * * `returnDocument`: Boolean. If set to true, the associated Document - * object will be returned in - * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. - * * `returnScore`: Boolean. If set to true, the recommendation 'score' - * corresponding to each returned Document will be set in - * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. - * The given 'score' indicates the probability of a Document conversion - * given the user's context and history. - * * `strictFiltering`: Boolean. True by default. If set to false, the service - * will return generic (unfiltered) popular Documents instead of empty if - * your filter blocks all recommendation results. - * * `diversityLevel`: String. Default empty. If set to be non-empty, then - * it needs to be one of: - * * `no-diversity` - * * `low-diversity` - * * `medium-diversity` - * * `high-diversity` - * * `auto-diversity` - * This gives request-level control and adjusts recommendation results - * based on Document category. - * - * Generated from protobuf field map params = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParams() - { - return $this->params; - } - - /** - * Additional domain specific parameters for the recommendations. - * Allowed values: - * * `returnDocument`: Boolean. If set to true, the associated Document - * object will be returned in - * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. - * * `returnScore`: Boolean. If set to true, the recommendation 'score' - * corresponding to each returned Document will be set in - * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. - * The given 'score' indicates the probability of a Document conversion - * given the user's context and history. - * * `strictFiltering`: Boolean. True by default. If set to false, the service - * will return generic (unfiltered) popular Documents instead of empty if - * your filter blocks all recommendation results. - * * `diversityLevel`: String. Default empty. If set to be non-empty, then - * it needs to be one of: - * * `no-diversity` - * * `low-diversity` - * * `medium-diversity` - * * `high-diversity` - * * `auto-diversity` - * This gives request-level control and adjusts recommendation results - * based on Document category. - * - * Generated from protobuf field map params = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParams($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->params = $arr; - - return $this; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php deleted file mode 100644 index 8e44adf0d4f0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.discoveryengine.v1beta.RecommendResponse - */ -class RecommendResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of recommended Documents. The order represents the ranking (from the - * most relevant Document to the least). - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; - */ - private $results; - /** - * A unique attribution token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this recommendation, which enables accurate attribution of - * recommendation model performance. - * - * Generated from protobuf field string attribution_token = 2; - */ - protected $attribution_token = ''; - /** - * IDs of documents in the request that were missing from the default Branch - * associated with the requested ServingConfig. - * - * Generated from protobuf field repeated string missing_ids = 3; - */ - private $missing_ids; - /** - * True if - * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] - * was set. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $results - * A list of recommended Documents. The order represents the ranking (from the - * most relevant Document to the least). - * @type string $attribution_token - * A unique attribution token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this recommendation, which enables accurate attribution of - * recommendation model performance. - * @type array|\Google\Protobuf\Internal\RepeatedField $missing_ids - * IDs of documents in the request that were missing from the default Branch - * associated with the requested ServingConfig. - * @type bool $validate_only - * True if - * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] - * was set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); - parent::__construct($data); - } - - /** - * A list of recommended Documents. The order represents the ranking (from the - * most relevant Document to the least). - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * A list of recommended Documents. The order represents the ranking (from the - * most relevant Document to the least). - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult::class); - $this->results = $arr; - - return $this; - } - - /** - * A unique attribution token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this recommendation, which enables accurate attribution of - * recommendation model performance. - * - * Generated from protobuf field string attribution_token = 2; - * @return string - */ - public function getAttributionToken() - { - return $this->attribution_token; - } - - /** - * A unique attribution token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this recommendation, which enables accurate attribution of - * recommendation model performance. - * - * Generated from protobuf field string attribution_token = 2; - * @param string $var - * @return $this - */ - public function setAttributionToken($var) - { - GPBUtil::checkString($var, True); - $this->attribution_token = $var; - - return $this; - } - - /** - * IDs of documents in the request that were missing from the default Branch - * associated with the requested ServingConfig. - * - * Generated from protobuf field repeated string missing_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMissingIds() - { - return $this->missing_ids; - } - - /** - * IDs of documents in the request that were missing from the default Branch - * associated with the requested ServingConfig. - * - * Generated from protobuf field repeated string missing_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMissingIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->missing_ids = $arr; - - return $this; - } - - /** - * True if - * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] - * was set. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * True if - * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] - * was set. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php deleted file mode 100644 index 4e854a029d52..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/RecommendResponse/RecommendationResult.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult - */ -class RecommendationResult extends \Google\Protobuf\Internal\Message -{ - /** - * Resource ID of the recommended Document. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Set if `returnDocument` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - */ - protected $document = null; - /** - * Additional Document metadata / annotations. - * Possible values: - * * `score`: Recommendation score in double value. Is set if - * `returnScore` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Resource ID of the recommended Document. - * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document - * Set if `returnDocument` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Additional Document metadata / annotations. - * Possible values: - * * `score`: Recommendation score in double value. Is set if - * `returnScore` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RecommendationService::initOnce(); - parent::__construct($data); - } - - /** - * Resource ID of the recommended Document. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Resource ID of the recommended Document. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Set if `returnDocument` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Set if `returnDocument` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Additional Document metadata / annotations. - * Possible values: - * * `score`: Recommendation score in double value. Is set if - * `returnScore` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Additional Document metadata / annotations. - * Possible values: - * * `score`: Recommendation score in double value. Is set if - * `returnScore` is set to true in - * [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->metadata = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RecommendationResult::class, \Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse_RecommendationResult::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php deleted file mode 100644 index 707f22be7389..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/Schema.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.discoveryengine.v1beta.Schema - */ -class Schema extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $struct_schema - * The structured representation of the schema. - * @type string $json_schema - * The JSON representation of the schema. - * @type string $name - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Schema::initOnce(); - parent::__construct($data); - } - - /** - * The structured representation of the schema. - * - * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getStructSchema() - { - return $this->readOneof(2); - } - - public function hasStructSchema() - { - return $this->hasOneof(2); - } - - /** - * The structured representation of the schema. - * - * Generated from protobuf field .google.protobuf.Struct struct_schema = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setStructSchema($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The JSON representation of the schema. - * - * Generated from protobuf field string json_schema = 3; - * @return string - */ - public function getJsonSchema() - { - return $this->readOneof(3); - } - - public function hasJsonSchema() - { - return $this->hasOneof(3); - } - - /** - * The JSON representation of the schema. - * - * Generated from protobuf field string json_schema = 3; - * @param string $var - * @return $this - */ - public function setJsonSchema($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The full resource name of the schema, in the format of - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php deleted file mode 100644 index 0c701aeeff2a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchInfo.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchInfo - */ -class SearchInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] - * or - * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string search_query = 1; - */ - protected $search_query = ''; - /** - * The order in which products are returned, if applicable. - * See - * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] - * for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string order_by = 2; - */ - protected $order_by = ''; - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] - * for definition. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $search_query - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] - * or - * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type string $order_by - * The order in which products are returned, if applicable. - * See - * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] - * for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type int $offset - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] - * for definition. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] - * or - * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string search_query = 1; - * @return string - */ - public function getSearchQuery() - { - return $this->search_query; - } - - /** - * The user's search query. - * See - * [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] - * for definition. - * The value must be a UTF-8 encoded string with a length limit of 5,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * At least one of - * [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] - * or - * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] - * is required for `search` events. Other event types should not set this - * field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string search_query = 1; - * @param string $var - * @return $this - */ - public function setSearchQuery($var) - { - GPBUtil::checkString($var, True); - $this->search_query = $var; - - return $this; - } - - /** - * The order in which products are returned, if applicable. - * See - * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] - * for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string order_by = 2; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order in which products are returned, if applicable. - * See - * [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] - * for definition and syntax. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string order_by = 2; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] - * for definition. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - * @return int - */ - public function getOffset() - { - return isset($this->offset) ? $this->offset : 0; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * An integer that specifies the current offset for pagination (the 0-indexed - * starting location, amongst the products deemed by the API as relevant). - * See - * [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] - * for definition. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * This can only be set for `search` events. Other event types should not set - * this field. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field optional int32 offset = 3; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php deleted file mode 100644 index 2ba13d5cf0eb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest.php +++ /dev/null @@ -1,1005 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest - */ -class SearchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $serving_config = ''; - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - */ - protected $branch = ''; - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - */ - protected $query = ''; - /** - * Raw image query. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - */ - protected $image_query = null; - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API - * as relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * is unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. Filter - * expression is case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string filter = 7; - */ - protected $filter = ''; - /** - * The order in which documents are returned. Documents can be ordered by - * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. `order_by` expression is - * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string order_by = 8; - */ - protected $order_by = ''; - /** - * Information about the end user. - * Highly recommended for analytics. - * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * is used to deduce `device_type` for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - */ - protected $user_info = null; - /** - * Facet specifications for faceted search. If empty, no facets are returned. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - */ - private $facet_specs; - /** - * Boost specification to boost certain documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - */ - protected $boost_spec = null; - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - */ - private $params; - /** - * The query expansion specification that specifies the conditions under which - * query expansion occurs. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - */ - protected $query_expansion_spec = null; - /** - * The spell correction specification that specifies the mode under - * which spell correction takes effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - */ - protected $spell_correction_spec = null; - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - */ - protected $user_pseudo_id = ''; - /** - * A specification for configuring the behavior of content search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - */ - protected $content_search_spec = null; - /** - * Whether to turn on safe search. This is only supported for - * website search. - * - * Generated from protobuf field bool safe_search = 20; - */ - protected $safe_search = false; - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - */ - private $user_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serving_config - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * @type string $branch - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * @type string $query - * Raw search query. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $image_query - * Raw image query. - * @type int $page_size - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * @type string $page_token - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * @type int $offset - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API - * as relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * is unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * @type string $filter - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. Filter - * expression is case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * @type string $order_by - * The order in which documents are returned. Documents can be ordered by - * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. `order_by` expression is - * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * @type \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $user_info - * Information about the end user. - * Highly recommended for analytics. - * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * is used to deduce `device_type` for analytics. - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec>|\Google\Protobuf\Internal\RepeatedField $facet_specs - * Facet specifications for faceted search. If empty, no facets are returned. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $boost_spec - * Boost specification to boost certain documents. - * @type array|\Google\Protobuf\Internal\MapField $params - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $query_expansion_spec - * The query expansion specification that specifies the conditions under which - * query expansion occurs. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $spell_correction_spec - * The spell correction specification that specifies the mode under - * which spell correction takes effect. - * @type string $user_pseudo_id - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $content_search_spec - * A specification for configuring the behavior of content search. - * @type bool $safe_search - * Whether to turn on safe search. This is only supported for - * website search. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServingConfig() - { - return $this->serving_config; - } - - /** - * Required. The resource name of the Search serving config, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. - * This field is used to identify the serving configuration name, set - * of models used to make the search. - * - * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServingConfig($var) - { - GPBUtil::checkString($var, True); - $this->serving_config = $var; - - return $this; - } - - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getBranch() - { - return $this->branch; - } - - /** - * The branch resource name, such as - * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. - * Use `default_branch` as the branch ID or leave this field empty, to search - * documents under the default branch. - * - * Generated from protobuf field string branch = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBranch($var) - { - GPBUtil::checkString($var, True); - $this->branch = $var; - - return $this; - } - - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Raw search query. - * - * Generated from protobuf field string query = 3; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Raw image query. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery|null - */ - public function getImageQuery() - { - return $this->image_query; - } - - public function hasImageQuery() - { - return isset($this->image_query); - } - - public function clearImageQuery() - { - unset($this->image_query); - } - - /** - * Raw image query. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery $var - * @return $this - */ - public function setImageQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ImageQuery::class); - $this->image_query = $var; - - return $this; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * must match the call that provided the page token. Otherwise, an - * `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API - * as relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * is unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * A 0-indexed integer that specifies the current offset (that is, starting - * result location, amongst the - * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API - * as relevant) in search results. This field is only considered if - * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * is unset. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 offset = 6; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. Filter - * expression is case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string filter = 7; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. Filter - * expression is case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string filter = 7; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The order in which documents are returned. Documents can be ordered by - * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. `order_by` expression is - * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string order_by = 8; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order in which documents are returned. Documents can be ordered by - * a field in an [Document][google.cloud.discoveryengine.v1beta.Document] - * object. Leave it unset if ordered by relevance. `order_by` expression is - * case-sensitive. - * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field string order_by = 8; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Information about the end user. - * Highly recommended for analytics. - * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * is used to deduce `device_type` for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - * @return \Google\Cloud\DiscoveryEngine\V1beta\UserInfo|null - */ - public function getUserInfo() - { - return $this->user_info; - } - - public function hasUserInfo() - { - return isset($this->user_info); - } - - public function clearUserInfo() - { - unset($this->user_info); - } - - /** - * Information about the end user. - * Highly recommended for analytics. - * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * is used to deduce `device_type` for analytics. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - * @param \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $var - * @return $this - */ - public function setUserInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserInfo::class); - $this->user_info = $var; - - return $this; - } - - /** - * Facet specifications for faceted search. If empty, no facets are returned. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFacetSpecs() - { - return $this->facet_specs; - } - - /** - * Facet specifications for faceted search. If empty, no facets are returned. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFacetSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec::class); - $this->facet_specs = $arr; - - return $this; - } - - /** - * Boost specification to boost certain documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec|null - */ - public function getBoostSpec() - { - return $this->boost_spec; - } - - public function hasBoostSpec() - { - return isset($this->boost_spec); - } - - public function clearBoostSpec() - { - unset($this->boost_spec); - } - - /** - * Boost specification to boost certain documents. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $var - * @return $this - */ - public function setBoostSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec::class); - $this->boost_spec = $var; - - return $this; - } - - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParams() - { - return $this->params; - } - - /** - * Additional search parameters. - * For public website search only, supported values are: - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * - * Generated from protobuf field map params = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParams($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->params = $arr; - - return $this; - } - - /** - * The query expansion specification that specifies the conditions under which - * query expansion occurs. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec|null - */ - public function getQueryExpansionSpec() - { - return $this->query_expansion_spec; - } - - public function hasQueryExpansionSpec() - { - return isset($this->query_expansion_spec); - } - - public function clearQueryExpansionSpec() - { - unset($this->query_expansion_spec); - } - - /** - * The query expansion specification that specifies the conditions under which - * query expansion occurs. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec $var - * @return $this - */ - public function setQueryExpansionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec::class); - $this->query_expansion_spec = $var; - - return $this; - } - - /** - * The spell correction specification that specifies the mode under - * which spell correction takes effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec|null - */ - public function getSpellCorrectionSpec() - { - return $this->spell_correction_spec; - } - - public function hasSpellCorrectionSpec() - { - return isset($this->spell_correction_spec); - } - - public function clearSpellCorrectionSpec() - { - unset($this->spell_correction_spec); - } - - /** - * The spell correction specification that specifies the mode under - * which spell correction takes effect. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec $var - * @return $this - */ - public function setSpellCorrectionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec::class); - $this->spell_correction_spec = $var; - - return $this; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. - * This field should NOT have a fixed value such as `unknown_visitor`. - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_pseudo_id = 15; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - - /** - * A specification for configuring the behavior of content search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec|null - */ - public function getContentSearchSpec() - { - return $this->content_search_spec; - } - - public function hasContentSearchSpec() - { - return isset($this->content_search_spec); - } - - public function clearContentSearchSpec() - { - unset($this->content_search_spec); - } - - /** - * A specification for configuring the behavior of content search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec $var - * @return $this - */ - public function setContentSearchSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec::class); - $this->content_search_spec = $var; - - return $this; - } - - /** - * Whether to turn on safe search. This is only supported for - * website search. - * - * Generated from protobuf field bool safe_search = 20; - * @return bool - */ - public function getSafeSearch() - { - return $this->safe_search; - } - - /** - * Whether to turn on safe search. This is only supported for - * website search. - * - * Generated from protobuf field bool safe_search = 20; - * @param bool $var - * @return $this - */ - public function setSafeSearch($var) - { - GPBUtil::checkBool($var); - $this->safe_search = $var; - - return $this; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * The user labels applied to a resource must meet the following requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map user_labels = 22; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php deleted file mode 100644 index dda79dcf64b3..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec - */ -class BoostSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Condition boost specifications. If a document matches multiple conditions - * in the specifictions, boost scores from these specifications are all - * applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - */ - private $condition_boost_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $condition_boost_specs - * Condition boost specifications. If a document matches multiple conditions - * in the specifictions, boost scores from these specifications are all - * applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Condition boost specifications. If a document matches multiple conditions - * in the specifictions, boost scores from these specifications are all - * applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditionBoostSpecs() - { - return $this->condition_boost_specs; - } - - /** - * Condition boost specifications. If a document matches multiple conditions - * in the specifictions, boost scores from these specifications are all - * applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditionBoostSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec::class); - $this->condition_boost_specs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BoostSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_BoostSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php deleted file mode 100644 index a56b23c9ae40..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec - */ -class ConditionBoostSpec extends \Google\Protobuf\Internal\Message -{ - /** - * An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. See - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * for detail syntax and limitations. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1; - */ - protected $condition = ''; - /** - * Strength of the condition boost, which should be in [-1, 1]. Negative - * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2; - */ - protected $boost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $condition - * An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. See - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * for detail syntax and limitations. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * @type float $boost - * Strength of the condition boost, which should be in [-1, 1]. Negative - * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. See - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * for detail syntax and limitations. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. See - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * for detail syntax and limitations. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * Strength of the condition boost, which should be in [-1, 1]. Negative - * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2; - * @return float - */ - public function getBoost() - { - return $this->boost; - } - - /** - * Strength of the condition boost, which should be in [-1, 1]. Negative - * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2; - * @param float $var - * @return $this - */ - public function setBoost($var) - { - GPBUtil::checkFloat($var); - $this->boost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConditionBoostSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_BoostSpec_ConditionBoostSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php deleted file mode 100644 index 80e063bf65c1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - */ -class ContentSearchSpec extends \Google\Protobuf\Internal\Message -{ - /** - * If `snippetSpec` is not specified, snippets are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - */ - protected $snippet_spec = null; - /** - * If `summarySpec` is not specified, summaries are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - */ - protected $summary_spec = null; - /** - * If there is no extractive_content_spec provided, there will be no - * extractive answer in the search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - */ - protected $extractive_content_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $snippet_spec - * If `snippetSpec` is not specified, snippets are not included in the - * search response. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec $summary_spec - * If `summarySpec` is not specified, summaries are not included in the - * search response. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $extractive_content_spec - * If there is no extractive_content_spec provided, there will be no - * extractive answer in the search response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * If `snippetSpec` is not specified, snippets are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec|null - */ - public function getSnippetSpec() - { - return $this->snippet_spec; - } - - public function hasSnippetSpec() - { - return isset($this->snippet_spec); - } - - public function clearSnippetSpec() - { - unset($this->snippet_spec); - } - - /** - * If `snippetSpec` is not specified, snippets are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec $var - * @return $this - */ - public function setSnippetSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SnippetSpec::class); - $this->snippet_spec = $var; - - return $this; - } - - /** - * If `summarySpec` is not specified, summaries are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec|null - */ - public function getSummarySpec() - { - return $this->summary_spec; - } - - public function hasSummarySpec() - { - return isset($this->summary_spec); - } - - public function clearSummarySpec() - { - unset($this->summary_spec); - } - - /** - * If `summarySpec` is not specified, summaries are not included in the - * search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec $var - * @return $this - */ - public function setSummarySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec::class); - $this->summary_spec = $var; - - return $this; - } - - /** - * If there is no extractive_content_spec provided, there will be no - * extractive answer in the search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec|null - */ - public function getExtractiveContentSpec() - { - return $this->extractive_content_spec; - } - - public function hasExtractiveContentSpec() - { - return isset($this->extractive_content_spec); - } - - public function clearExtractiveContentSpec() - { - unset($this->extractive_content_spec); - } - - /** - * If there is no extractive_content_spec provided, there will be no - * extractive answer in the search response. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $var - * @return $this - */ - public function setExtractiveContentSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\ExtractiveContentSpec::class); - $this->extractive_content_spec = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentSearchSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php deleted file mode 100644 index e7c0b66b6e7d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec - */ -class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of extractive answers returned in each search - * result. - * An extractive answer is a verbatim answer extracted from the original - * document, which provides a precise and contextually relevant answer to - * the search query. - * If the number of matching answers is less than the - * `max_extractive_answer_count`, return all of the answers. Otherwise, - * return the `max_extractive_answer_count`. - * At most one answer is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_answer_count = 1; - */ - protected $max_extractive_answer_count = 0; - /** - * The max number of extractive segments returned in each search result. - * Only applied if the - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to - * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] - * or - * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. - * An extractive segment is a text segment extracted from the original - * document that is relevant to the search query, and, in general, more - * verbose than an extractive answer. The segment could then be used as - * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than - * `max_extractive_segment_count`, return all of the segments. Otherwise, - * return the `max_extractive_segment_count`. - * Currently one segment is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_segment_count = 2; - */ - protected $max_extractive_segment_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_extractive_answer_count - * The maximum number of extractive answers returned in each search - * result. - * An extractive answer is a verbatim answer extracted from the original - * document, which provides a precise and contextually relevant answer to - * the search query. - * If the number of matching answers is less than the - * `max_extractive_answer_count`, return all of the answers. Otherwise, - * return the `max_extractive_answer_count`. - * At most one answer is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * @type int $max_extractive_segment_count - * The max number of extractive segments returned in each search result. - * Only applied if the - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to - * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] - * or - * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. - * An extractive segment is a text segment extracted from the original - * document that is relevant to the search query, and, in general, more - * verbose than an extractive answer. The segment could then be used as - * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than - * `max_extractive_segment_count`, return all of the segments. Otherwise, - * return the `max_extractive_segment_count`. - * Currently one segment is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of extractive answers returned in each search - * result. - * An extractive answer is a verbatim answer extracted from the original - * document, which provides a precise and contextually relevant answer to - * the search query. - * If the number of matching answers is less than the - * `max_extractive_answer_count`, return all of the answers. Otherwise, - * return the `max_extractive_answer_count`. - * At most one answer is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_answer_count = 1; - * @return int - */ - public function getMaxExtractiveAnswerCount() - { - return $this->max_extractive_answer_count; - } - - /** - * The maximum number of extractive answers returned in each search - * result. - * An extractive answer is a verbatim answer extracted from the original - * document, which provides a precise and contextually relevant answer to - * the search query. - * If the number of matching answers is less than the - * `max_extractive_answer_count`, return all of the answers. Otherwise, - * return the `max_extractive_answer_count`. - * At most one answer is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_answer_count = 1; - * @param int $var - * @return $this - */ - public function setMaxExtractiveAnswerCount($var) - { - GPBUtil::checkInt32($var); - $this->max_extractive_answer_count = $var; - - return $this; - } - - /** - * The max number of extractive segments returned in each search result. - * Only applied if the - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to - * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] - * or - * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. - * An extractive segment is a text segment extracted from the original - * document that is relevant to the search query, and, in general, more - * verbose than an extractive answer. The segment could then be used as - * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than - * `max_extractive_segment_count`, return all of the segments. Otherwise, - * return the `max_extractive_segment_count`. - * Currently one segment is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_segment_count = 2; - * @return int - */ - public function getMaxExtractiveSegmentCount() - { - return $this->max_extractive_segment_count; - } - - /** - * The max number of extractive segments returned in each search result. - * Only applied if the - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to - * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] - * or - * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. - * An extractive segment is a text segment extracted from the original - * document that is relevant to the search query, and, in general, more - * verbose than an extractive answer. The segment could then be used as - * input for LLMs to generate summaries and answers. - * If the number of matching segments is less than - * `max_extractive_segment_count`, return all of the segments. Otherwise, - * return the `max_extractive_segment_count`. - * Currently one segment is returned for each - * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. - * - * Generated from protobuf field int32 max_extractive_segment_count = 2; - * @param int $var - * @return $this - */ - public function setMaxExtractiveSegmentCount($var) - { - GPBUtil::checkInt32($var); - $this->max_extractive_segment_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExtractiveContentSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_ExtractiveContentSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php deleted file mode 100644 index 9a226dc4194b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SnippetSpec.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - */ -class SnippetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * [DEPRECATED] This field is deprecated. To control snippet return, use - * `return_snippet` field. For backwards compatibility, we will return - * snippet if max_snippet_count > 0. - * - * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; - * @deprecated - */ - protected $max_snippet_count = 0; - /** - * [DEPRECATED] This field is deprecated and will have no affect on the - * snippet. - * - * Generated from protobuf field bool reference_only = 2 [deprecated = true]; - * @deprecated - */ - protected $reference_only = false; - /** - * If `true`, then return snippet. If no snippet can be generated, we - * return "No snippet is available for this page." A `snippet_status` with - * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. - * - * Generated from protobuf field bool return_snippet = 3; - */ - protected $return_snippet = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_snippet_count - * [DEPRECATED] This field is deprecated. To control snippet return, use - * `return_snippet` field. For backwards compatibility, we will return - * snippet if max_snippet_count > 0. - * @type bool $reference_only - * [DEPRECATED] This field is deprecated and will have no affect on the - * snippet. - * @type bool $return_snippet - * If `true`, then return snippet. If no snippet can be generated, we - * return "No snippet is available for this page." A `snippet_status` with - * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * [DEPRECATED] This field is deprecated. To control snippet return, use - * `return_snippet` field. For backwards compatibility, we will return - * snippet if max_snippet_count > 0. - * - * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; - * @return int - * @deprecated - */ - public function getMaxSnippetCount() - { - @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); - return $this->max_snippet_count; - } - - /** - * [DEPRECATED] This field is deprecated. To control snippet return, use - * `return_snippet` field. For backwards compatibility, we will return - * snippet if max_snippet_count > 0. - * - * Generated from protobuf field int32 max_snippet_count = 1 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setMaxSnippetCount($var) - { - @trigger_error('max_snippet_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->max_snippet_count = $var; - - return $this; - } - - /** - * [DEPRECATED] This field is deprecated and will have no affect on the - * snippet. - * - * Generated from protobuf field bool reference_only = 2 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getReferenceOnly() - { - @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); - return $this->reference_only; - } - - /** - * [DEPRECATED] This field is deprecated and will have no affect on the - * snippet. - * - * Generated from protobuf field bool reference_only = 2 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setReferenceOnly($var) - { - @trigger_error('reference_only is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->reference_only = $var; - - return $this; - } - - /** - * If `true`, then return snippet. If no snippet can be generated, we - * return "No snippet is available for this page." A `snippet_status` with - * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. - * - * Generated from protobuf field bool return_snippet = 3; - * @return bool - */ - public function getReturnSnippet() - { - return $this->return_snippet; - } - - /** - * If `true`, then return snippet. If no snippet can be generated, we - * return "No snippet is available for this page." A `snippet_status` with - * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. - * - * Generated from protobuf field bool return_snippet = 3; - * @param bool $var - * @return $this - */ - public function setReturnSnippet($var) - { - GPBUtil::checkBool($var); - $this->return_snippet = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SnippetSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_SnippetSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php deleted file mode 100644 index 7455f8e07b70..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php +++ /dev/null @@ -1,301 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - */ -class SummarySpec extends \Google\Protobuf\Internal\Message -{ - /** - * The number of top results to generate the summary from. If the number - * of results returned is less than `summaryResultCount`, the summary is - * generated from all of the results. - * At most five results can be used to generate a summary. - * - * Generated from protobuf field int32 summary_result_count = 1; - */ - protected $summary_result_count = 0; - /** - * Specifies whether to include citations in the summary. The default - * value is `false`. - * When this field is set to `true`, summaries include in-line citation - * numbers. - * Example summary including citations: - * BigQuery is Google Cloud's fully managed and completely serverless - * enterprise data warehouse [1]. BigQuery supports all data types, works - * across clouds, and has built-in machine learning and business - * intelligence, all within a unified platform [2, 3]. - * The citation numbers refer to the returned search results and are - * 1-indexed. For example, [1] means that the sentence is attributed to - * the first search result. [2, 3] means that the sentence is attributed - * to both the second and third search results. - * - * Generated from protobuf field bool include_citations = 2; - */ - protected $include_citations = false; - /** - * Specifies whether to filter out adversarial queries. The default value - * is `false`. - * Google employs search-query classification to detect adversarial - * queries. No summary is returned if the search query is classified as an - * adversarial query. For example, a user might ask a question regarding - * negative comments about the company or submit a query designed to - * generate unsafe, policy-violating output. If this field is set to - * `true`, we skip generating summaries for adversarial queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_adversarial_query = 3; - */ - protected $ignore_adversarial_query = false; - /** - * Specifies whether to filter out queries that are not summary-seeking. - * The default value is `false`. - * Google employs search-query classification to detect summary-seeking - * queries. No summary is returned if the search query is classified as a - * non-summary seeking query. For example, `why is the sky blue` and `Who - * is the best soccer player in the world?` are summary-seeking queries, - * but `SFO airport` and `world cup 2026` are not. They are most likely - * navigational queries. If this field is set to `true`, we skip - * generating summaries for non-summary seeking queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; - */ - protected $ignore_non_summary_seeking_query = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $summary_result_count - * The number of top results to generate the summary from. If the number - * of results returned is less than `summaryResultCount`, the summary is - * generated from all of the results. - * At most five results can be used to generate a summary. - * @type bool $include_citations - * Specifies whether to include citations in the summary. The default - * value is `false`. - * When this field is set to `true`, summaries include in-line citation - * numbers. - * Example summary including citations: - * BigQuery is Google Cloud's fully managed and completely serverless - * enterprise data warehouse [1]. BigQuery supports all data types, works - * across clouds, and has built-in machine learning and business - * intelligence, all within a unified platform [2, 3]. - * The citation numbers refer to the returned search results and are - * 1-indexed. For example, [1] means that the sentence is attributed to - * the first search result. [2, 3] means that the sentence is attributed - * to both the second and third search results. - * @type bool $ignore_adversarial_query - * Specifies whether to filter out adversarial queries. The default value - * is `false`. - * Google employs search-query classification to detect adversarial - * queries. No summary is returned if the search query is classified as an - * adversarial query. For example, a user might ask a question regarding - * negative comments about the company or submit a query designed to - * generate unsafe, policy-violating output. If this field is set to - * `true`, we skip generating summaries for adversarial queries and return - * fallback messages instead. - * @type bool $ignore_non_summary_seeking_query - * Specifies whether to filter out queries that are not summary-seeking. - * The default value is `false`. - * Google employs search-query classification to detect summary-seeking - * queries. No summary is returned if the search query is classified as a - * non-summary seeking query. For example, `why is the sky blue` and `Who - * is the best soccer player in the world?` are summary-seeking queries, - * but `SFO airport` and `world cup 2026` are not. They are most likely - * navigational queries. If this field is set to `true`, we skip - * generating summaries for non-summary seeking queries and return - * fallback messages instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The number of top results to generate the summary from. If the number - * of results returned is less than `summaryResultCount`, the summary is - * generated from all of the results. - * At most five results can be used to generate a summary. - * - * Generated from protobuf field int32 summary_result_count = 1; - * @return int - */ - public function getSummaryResultCount() - { - return $this->summary_result_count; - } - - /** - * The number of top results to generate the summary from. If the number - * of results returned is less than `summaryResultCount`, the summary is - * generated from all of the results. - * At most five results can be used to generate a summary. - * - * Generated from protobuf field int32 summary_result_count = 1; - * @param int $var - * @return $this - */ - public function setSummaryResultCount($var) - { - GPBUtil::checkInt32($var); - $this->summary_result_count = $var; - - return $this; - } - - /** - * Specifies whether to include citations in the summary. The default - * value is `false`. - * When this field is set to `true`, summaries include in-line citation - * numbers. - * Example summary including citations: - * BigQuery is Google Cloud's fully managed and completely serverless - * enterprise data warehouse [1]. BigQuery supports all data types, works - * across clouds, and has built-in machine learning and business - * intelligence, all within a unified platform [2, 3]. - * The citation numbers refer to the returned search results and are - * 1-indexed. For example, [1] means that the sentence is attributed to - * the first search result. [2, 3] means that the sentence is attributed - * to both the second and third search results. - * - * Generated from protobuf field bool include_citations = 2; - * @return bool - */ - public function getIncludeCitations() - { - return $this->include_citations; - } - - /** - * Specifies whether to include citations in the summary. The default - * value is `false`. - * When this field is set to `true`, summaries include in-line citation - * numbers. - * Example summary including citations: - * BigQuery is Google Cloud's fully managed and completely serverless - * enterprise data warehouse [1]. BigQuery supports all data types, works - * across clouds, and has built-in machine learning and business - * intelligence, all within a unified platform [2, 3]. - * The citation numbers refer to the returned search results and are - * 1-indexed. For example, [1] means that the sentence is attributed to - * the first search result. [2, 3] means that the sentence is attributed - * to both the second and third search results. - * - * Generated from protobuf field bool include_citations = 2; - * @param bool $var - * @return $this - */ - public function setIncludeCitations($var) - { - GPBUtil::checkBool($var); - $this->include_citations = $var; - - return $this; - } - - /** - * Specifies whether to filter out adversarial queries. The default value - * is `false`. - * Google employs search-query classification to detect adversarial - * queries. No summary is returned if the search query is classified as an - * adversarial query. For example, a user might ask a question regarding - * negative comments about the company or submit a query designed to - * generate unsafe, policy-violating output. If this field is set to - * `true`, we skip generating summaries for adversarial queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_adversarial_query = 3; - * @return bool - */ - public function getIgnoreAdversarialQuery() - { - return $this->ignore_adversarial_query; - } - - /** - * Specifies whether to filter out adversarial queries. The default value - * is `false`. - * Google employs search-query classification to detect adversarial - * queries. No summary is returned if the search query is classified as an - * adversarial query. For example, a user might ask a question regarding - * negative comments about the company or submit a query designed to - * generate unsafe, policy-violating output. If this field is set to - * `true`, we skip generating summaries for adversarial queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_adversarial_query = 3; - * @param bool $var - * @return $this - */ - public function setIgnoreAdversarialQuery($var) - { - GPBUtil::checkBool($var); - $this->ignore_adversarial_query = $var; - - return $this; - } - - /** - * Specifies whether to filter out queries that are not summary-seeking. - * The default value is `false`. - * Google employs search-query classification to detect summary-seeking - * queries. No summary is returned if the search query is classified as a - * non-summary seeking query. For example, `why is the sky blue` and `Who - * is the best soccer player in the world?` are summary-seeking queries, - * but `SFO airport` and `world cup 2026` are not. They are most likely - * navigational queries. If this field is set to `true`, we skip - * generating summaries for non-summary seeking queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; - * @return bool - */ - public function getIgnoreNonSummarySeekingQuery() - { - return $this->ignore_non_summary_seeking_query; - } - - /** - * Specifies whether to filter out queries that are not summary-seeking. - * The default value is `false`. - * Google employs search-query classification to detect summary-seeking - * queries. No summary is returned if the search query is classified as a - * non-summary seeking query. For example, `why is the sky blue` and `Who - * is the best soccer player in the world?` are summary-seeking queries, - * but `SFO airport` and `world cup 2026` are not. They are most likely - * navigational queries. If this field is set to `true`, we skip - * generating summaries for non-summary seeking queries and return - * fallback messages instead. - * - * Generated from protobuf field bool ignore_non_summary_seeking_query = 4; - * @param bool $var - * @return $this - */ - public function setIgnoreNonSummarySeekingQuery($var) - { - GPBUtil::checkBool($var); - $this->ignore_non_summary_seeking_query = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SummarySpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_ContentSearchSpec_SummarySpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php deleted file mode 100644 index 8b917184f22b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec - */ -class FacetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The facet key specification. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $facet_key = null; - /** - * Maximum of facet values that should be returned for this facet. If - * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 are coerced to 300. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 limit = 2; - */ - protected $limit = 0; - /** - * List of keys to exclude when faceting. - * By default, - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * is not excluded from the filter unless it is listed in this field. - * Listing a facet key in this field allows its values to appear as facet - * results, even when they are filtered out of search results. Using this - * field does not affect what search results are returned. - * For example, suppose there are 100 documents with the color facet "Red" - * and 200 documents with the color facet "Blue". A query containing the - * filter "color:ANY("Red")" and having "color" as - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * would by default return only "Red" documents in the search results, and - * also return "Red" with count 100 as the only color facet. Although there - * are also blue documents available, "Blue" would not be shown as an - * available facet value. - * If "color" is listed in "excludedFilterKeys", then the query returns the - * facet values "Red" with count 100 and "Blue" with count 200, because the - * "color" key is now excluded from the filter. Because this field doesn't - * affect search results, the search results are still correctly filtered to - * return only "Red" documents. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated string excluded_filter_keys = 3; - */ - private $excluded_filter_keys; - /** - * Enables dynamic position for this facet. If set to true, the position of - * this facet among all facets in the response is determined automatically. - * If dynamic facets are enabled, it is ordered together. - * If set to false, the position of this facet in the - * response is the same as in the request, and it is ranked before - * the facets with dynamic position enable and all dynamic facets. - * For example, you may always want to have rating facet returned in - * the response, but it's not necessarily to always display the rating facet - * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response is determined - * automatically. - * Another example, assuming you have the following facets in the request: - * * "rating", enable_dynamic_position = true - * * "price", enable_dynamic_position = false - * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enabled, which generates a facet - * `gender`. Then the final order of the facets in the response can be - * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", - * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" are always - * ranked at first and second position because their enable_dynamic_position - * is false. - * - * Generated from protobuf field bool enable_dynamic_position = 4; - */ - protected $enable_dynamic_position = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey $facet_key - * Required. The facet key specification. - * @type int $limit - * Maximum of facet values that should be returned for this facet. If - * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 are coerced to 300. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_filter_keys - * List of keys to exclude when faceting. - * By default, - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * is not excluded from the filter unless it is listed in this field. - * Listing a facet key in this field allows its values to appear as facet - * results, even when they are filtered out of search results. Using this - * field does not affect what search results are returned. - * For example, suppose there are 100 documents with the color facet "Red" - * and 200 documents with the color facet "Blue". A query containing the - * filter "color:ANY("Red")" and having "color" as - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * would by default return only "Red" documents in the search results, and - * also return "Red" with count 100 as the only color facet. Although there - * are also blue documents available, "Blue" would not be shown as an - * available facet value. - * If "color" is listed in "excludedFilterKeys", then the query returns the - * facet values "Red" with count 100 and "Blue" with count 200, because the - * "color" key is now excluded from the filter. Because this field doesn't - * affect search results, the search results are still correctly filtered to - * return only "Red" documents. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * @type bool $enable_dynamic_position - * Enables dynamic position for this facet. If set to true, the position of - * this facet among all facets in the response is determined automatically. - * If dynamic facets are enabled, it is ordered together. - * If set to false, the position of this facet in the - * response is the same as in the request, and it is ranked before - * the facets with dynamic position enable and all dynamic facets. - * For example, you may always want to have rating facet returned in - * the response, but it's not necessarily to always display the rating facet - * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response is determined - * automatically. - * Another example, assuming you have the following facets in the request: - * * "rating", enable_dynamic_position = true - * * "price", enable_dynamic_position = false - * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enabled, which generates a facet - * `gender`. Then the final order of the facets in the response can be - * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", - * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" are always - * ranked at first and second position because their enable_dynamic_position - * is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The facet key specification. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey|null - */ - public function getFacetKey() - { - return $this->facet_key; - } - - public function hasFacetKey() - { - return isset($this->facet_key); - } - - public function clearFacetKey() - { - unset($this->facet_key); - } - - /** - * Required. The facet key specification. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey $var - * @return $this - */ - public function setFacetKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\FacetSpec\FacetKey::class); - $this->facet_key = $var; - - return $this; - } - - /** - * Maximum of facet values that should be returned for this facet. If - * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 are coerced to 300. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 limit = 2; - * @return int - */ - public function getLimit() - { - return $this->limit; - } - - /** - * Maximum of facet values that should be returned for this facet. If - * unspecified, defaults to 20. The maximum allowed value is 300. Values - * above 300 are coerced to 300. - * If this field is negative, an `INVALID_ARGUMENT` is returned. - * - * Generated from protobuf field int32 limit = 2; - * @param int $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkInt32($var); - $this->limit = $var; - - return $this; - } - - /** - * List of keys to exclude when faceting. - * By default, - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * is not excluded from the filter unless it is listed in this field. - * Listing a facet key in this field allows its values to appear as facet - * results, even when they are filtered out of search results. Using this - * field does not affect what search results are returned. - * For example, suppose there are 100 documents with the color facet "Red" - * and 200 documents with the color facet "Blue". A query containing the - * filter "color:ANY("Red")" and having "color" as - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * would by default return only "Red" documents in the search results, and - * also return "Red" with count 100 as the only color facet. Although there - * are also blue documents available, "Blue" would not be shown as an - * available facet value. - * If "color" is listed in "excludedFilterKeys", then the query returns the - * facet values "Red" with count 100 and "Blue" with count 200, because the - * "color" key is now excluded from the filter. Because this field doesn't - * affect search results, the search results are still correctly filtered to - * return only "Red" documents. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated string excluded_filter_keys = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludedFilterKeys() - { - return $this->excluded_filter_keys; - } - - /** - * List of keys to exclude when faceting. - * By default, - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * is not excluded from the filter unless it is listed in this field. - * Listing a facet key in this field allows its values to appear as facet - * results, even when they are filtered out of search results. Using this - * field does not affect what search results are returned. - * For example, suppose there are 100 documents with the color facet "Red" - * and 200 documents with the color facet "Blue". A query containing the - * filter "color:ANY("Red")" and having "color" as - * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - * would by default return only "Red" documents in the search results, and - * also return "Red" with count 100 as the only color facet. Although there - * are also blue documents available, "Blue" would not be shown as an - * available facet value. - * If "color" is listed in "excludedFilterKeys", then the query returns the - * facet values "Red" with count 100 and "Blue" with count 200, because the - * "color" key is now excluded from the filter. Because this field doesn't - * affect search results, the search results are still correctly filtered to - * return only "Red" documents. - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. - * - * Generated from protobuf field repeated string excluded_filter_keys = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludedFilterKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excluded_filter_keys = $arr; - - return $this; - } - - /** - * Enables dynamic position for this facet. If set to true, the position of - * this facet among all facets in the response is determined automatically. - * If dynamic facets are enabled, it is ordered together. - * If set to false, the position of this facet in the - * response is the same as in the request, and it is ranked before - * the facets with dynamic position enable and all dynamic facets. - * For example, you may always want to have rating facet returned in - * the response, but it's not necessarily to always display the rating facet - * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response is determined - * automatically. - * Another example, assuming you have the following facets in the request: - * * "rating", enable_dynamic_position = true - * * "price", enable_dynamic_position = false - * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enabled, which generates a facet - * `gender`. Then the final order of the facets in the response can be - * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", - * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" are always - * ranked at first and second position because their enable_dynamic_position - * is false. - * - * Generated from protobuf field bool enable_dynamic_position = 4; - * @return bool - */ - public function getEnableDynamicPosition() - { - return $this->enable_dynamic_position; - } - - /** - * Enables dynamic position for this facet. If set to true, the position of - * this facet among all facets in the response is determined automatically. - * If dynamic facets are enabled, it is ordered together. - * If set to false, the position of this facet in the - * response is the same as in the request, and it is ranked before - * the facets with dynamic position enable and all dynamic facets. - * For example, you may always want to have rating facet returned in - * the response, but it's not necessarily to always display the rating facet - * at the top. In that case, you can set enable_dynamic_position to true so - * that the position of rating facet in response is determined - * automatically. - * Another example, assuming you have the following facets in the request: - * * "rating", enable_dynamic_position = true - * * "price", enable_dynamic_position = false - * * "brands", enable_dynamic_position = false - * And also you have a dynamic facets enabled, which generates a facet - * `gender`. Then the final order of the facets in the response can be - * ("price", "brands", "rating", "gender") or ("price", "brands", "gender", - * "rating") depends on how API orders "gender" and "rating" facets. - * However, notice that "price" and "brands" are always - * ranked at first and second position because their enable_dynamic_position - * is false. - * - * Generated from protobuf field bool enable_dynamic_position = 4; - * @param bool $var - * @return $this - */ - public function setEnableDynamicPosition($var) - { - GPBUtil::checkBool($var); - $this->enable_dynamic_position = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FacetSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_FacetSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php deleted file mode 100644 index 8047689f4d3d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/FacetSpec/FacetKey.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey - */ -class FacetKey extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Supported textual and numerical facet keys in - * [Document][google.cloud.discoveryengine.v1beta.Document] object, over - * which the facet values are computed. Facet key is case-sensitive. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Set only if values should be bucketed into intervals. Must be set - * for facets with numerical values. Must not be set for facet with text - * values. Maximum number of intervals is 30. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; - */ - private $intervals; - /** - * Only get facet for the given restricted values. Only supported on - * textual fields. For example, suppose "category" has three values - * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet only - * contains "Action > 2022". Only supported on textual fields. Maximum - * is 10. - * - * Generated from protobuf field repeated string restricted_values = 3; - */ - private $restricted_values; - /** - * Only get facet values that start with the given string prefix. For - * example, suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet only contains "Action > 2022" and "Action > 2021". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string prefixes = 4; - */ - private $prefixes; - /** - * Only get facet values that contains the given strings. For example, - * suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string contains = 5; - */ - private $contains; - /** - * True to make facet keys case insensitive when getting faceting - * values with prefixes or contains; false otherwise. - * - * Generated from protobuf field bool case_insensitive = 6; - */ - protected $case_insensitive = false; - /** - * The order in which documents are returned. - * Allowed values are: - * * "count desc", which means order by - * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - * descending. - * * "value desc", which means order by - * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] - * descending. - * Only applies to textual facets. - * If not set, textual values are sorted in [natural - * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical - * intervals are sorted in the order given by - * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * - * Generated from protobuf field string order_by = 7; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. Supported textual and numerical facet keys in - * [Document][google.cloud.discoveryengine.v1beta.Document] object, over - * which the facet values are computed. Facet key is case-sensitive. - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Interval>|\Google\Protobuf\Internal\RepeatedField $intervals - * Set only if values should be bucketed into intervals. Must be set - * for facets with numerical values. Must not be set for facet with text - * values. Maximum number of intervals is 30. - * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_values - * Only get facet for the given restricted values. Only supported on - * textual fields. For example, suppose "category" has three values - * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet only - * contains "Action > 2022". Only supported on textual fields. Maximum - * is 10. - * @type array|\Google\Protobuf\Internal\RepeatedField $prefixes - * Only get facet values that start with the given string prefix. For - * example, suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet only contains "Action > 2022" and "Action > 2021". - * Only supported on textual fields. Maximum is 10. - * @type array|\Google\Protobuf\Internal\RepeatedField $contains - * Only get facet values that contains the given strings. For example, - * suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - * Only supported on textual fields. Maximum is 10. - * @type bool $case_insensitive - * True to make facet keys case insensitive when getting faceting - * values with prefixes or contains; false otherwise. - * @type string $order_by - * The order in which documents are returned. - * Allowed values are: - * * "count desc", which means order by - * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - * descending. - * * "value desc", which means order by - * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] - * descending. - * Only applies to textual facets. - * If not set, textual values are sorted in [natural - * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical - * intervals are sorted in the order given by - * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Supported textual and numerical facet keys in - * [Document][google.cloud.discoveryengine.v1beta.Document] object, over - * which the facet values are computed. Facet key is case-sensitive. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. Supported textual and numerical facet keys in - * [Document][google.cloud.discoveryengine.v1beta.Document] object, over - * which the facet values are computed. Facet key is case-sensitive. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Set only if values should be bucketed into intervals. Must be set - * for facets with numerical values. Must not be set for facet with text - * values. Maximum number of intervals is 30. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntervals() - { - return $this->intervals; - } - - /** - * Set only if values should be bucketed into intervals. Must be set - * for facets with numerical values. Must not be set for facet with text - * values. Maximum number of intervals is 30. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Interval intervals = 2; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Interval>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntervals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Interval::class); - $this->intervals = $arr; - - return $this; - } - - /** - * Only get facet for the given restricted values. Only supported on - * textual fields. For example, suppose "category" has three values - * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet only - * contains "Action > 2022". Only supported on textual fields. Maximum - * is 10. - * - * Generated from protobuf field repeated string restricted_values = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestrictedValues() - { - return $this->restricted_values; - } - - /** - * Only get facet for the given restricted values. Only supported on - * textual fields. For example, suppose "category" has three values - * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - * "restricted_values" to "Action > 2022", the "category" facet only - * contains "Action > 2022". Only supported on textual fields. Maximum - * is 10. - * - * Generated from protobuf field repeated string restricted_values = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestrictedValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->restricted_values = $arr; - - return $this; - } - - /** - * Only get facet values that start with the given string prefix. For - * example, suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet only contains "Action > 2022" and "Action > 2021". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string prefixes = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrefixes() - { - return $this->prefixes; - } - - /** - * Only get facet values that start with the given string prefix. For - * example, suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the - * "category" facet only contains "Action > 2022" and "Action > 2021". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string prefixes = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->prefixes = $arr; - - return $this; - } - - /** - * Only get facet values that contains the given strings. For example, - * suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string contains = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContains() - { - return $this->contains; - } - - /** - * Only get facet values that contains the given strings. For example, - * suppose "category" has three values "Action > 2022", - * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - * Only supported on textual fields. Maximum is 10. - * - * Generated from protobuf field repeated string contains = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->contains = $arr; - - return $this; - } - - /** - * True to make facet keys case insensitive when getting faceting - * values with prefixes or contains; false otherwise. - * - * Generated from protobuf field bool case_insensitive = 6; - * @return bool - */ - public function getCaseInsensitive() - { - return $this->case_insensitive; - } - - /** - * True to make facet keys case insensitive when getting faceting - * values with prefixes or contains; false otherwise. - * - * Generated from protobuf field bool case_insensitive = 6; - * @param bool $var - * @return $this - */ - public function setCaseInsensitive($var) - { - GPBUtil::checkBool($var); - $this->case_insensitive = $var; - - return $this; - } - - /** - * The order in which documents are returned. - * Allowed values are: - * * "count desc", which means order by - * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - * descending. - * * "value desc", which means order by - * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] - * descending. - * Only applies to textual facets. - * If not set, textual values are sorted in [natural - * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical - * intervals are sorted in the order given by - * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * - * Generated from protobuf field string order_by = 7; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order in which documents are returned. - * Allowed values are: - * * "count desc", which means order by - * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - * descending. - * * "value desc", which means order by - * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] - * descending. - * Only applies to textual facets. - * If not set, textual values are sorted in [natural - * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical - * intervals are sorted in the order given by - * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * - * Generated from protobuf field string order_by = 7; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FacetKey::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_FacetSpec_FacetKey::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php deleted file mode 100644 index c0f7f18f69e1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - */ -class QueryExpansionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; - */ - protected $condition = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $condition - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; - * @return int - */ - public function getCondition() - { - return $this->condition; - } - - /** - * The condition under which query expansion should occur. Default to - * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition condition = 1; - * @param int $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\QueryExpansionSpec\Condition::class); - $this->condition = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryExpansionSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_QueryExpansionSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php deleted file mode 100644 index d67b604f4317..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/QueryExpansionSpec/Condition.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition - */ -class Condition -{ - /** - * Unspecified query expansion condition. In this case, server behavior - * defaults to - * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - * - * Generated from protobuf enum CONDITION_UNSPECIFIED = 0; - */ - const CONDITION_UNSPECIFIED = 0; - /** - * Disabled query expansion. Only the exact search query is used, even if - * [SearchResponse.total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] - * is zero. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Automatic query expansion built by the Search API. - * - * Generated from protobuf enum AUTO = 2; - */ - const AUTO = 2; - - private static $valueToName = [ - self::CONDITION_UNSPECIFIED => 'CONDITION_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::AUTO => 'AUTO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Condition::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_QueryExpansionSpec_Condition::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php deleted file mode 100644 index c370a7cd3c26..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - */ -class SpellCorrectionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode under which spell correction should take effect to - * replace the original search query. Default to - * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\SpellCorrectionSpec\Mode::class); - $this->mode = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpellCorrectionSpec::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_SpellCorrectionSpec::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php deleted file mode 100644 index c6f8081c457b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchRequest/SpellCorrectionSpec/Mode.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode - */ -class Mode -{ - /** - * Unspecified spell correction mode. In this case, server behavior - * defaults to - * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Search API will try to find a spell suggestion if there - * is any and put in the - * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1beta.SearchResponse.corrected_query]. - * The spell suggestion will not be used as the search query. - * - * Generated from protobuf enum SUGGESTION_ONLY = 1; - */ - const SUGGESTION_ONLY = 1; - /** - * Automatic spell correction built by the Search API. Search will - * be based on the corrected query if found. - * - * Generated from protobuf enum AUTO = 2; - */ - const AUTO = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::SUGGESTION_ONLY => 'SUGGESTION_ONLY', - self::AUTO => 'AUTO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest_SpellCorrectionSpec_Mode::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php deleted file mode 100644 index b044661bde56..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse.php +++ /dev/null @@ -1,479 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse - */ -class SearchResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; - */ - private $results; - /** - * Results of facets requested by user. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; - */ - private $facets; - /** - * Guided search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; - */ - protected $guided_search_result = null; - /** - * The estimated total count of matched items irrespective of pagination. The - * count of - * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - */ - protected $attribution_token = ''; - /** - * The URI of a customer-defined redirect page. If redirect action is - * triggered, no search is performed, and only - * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] - * and - * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] - * are set in the response. - * - * Generated from protobuf field string redirect_uri = 12; - */ - protected $redirect_uri = ''; - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - */ - protected $next_page_token = ''; - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - */ - protected $corrected_query = ''; - /** - * A summary as part of the search results. - * This field is only returned if - * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] - * is set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; - */ - protected $summary = null; - /** - * Controls applied as part of the Control service. - * - * Generated from protobuf field repeated string applied_controls = 10; - */ - private $applied_controls; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $results - * A list of matched documents. The order represents the ranking. - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet>|\Google\Protobuf\Internal\RepeatedField $facets - * Results of facets requested by user. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult $guided_search_result - * Guided search result. - * @type int $total_size - * The estimated total count of matched items irrespective of pagination. The - * count of - * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] - * that matches. - * @type string $attribution_token - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this search, which enables accurate attribution of search model - * performance. - * @type string $redirect_uri - * The URI of a customer-defined redirect page. If redirect action is - * triggered, no search is performed, and only - * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] - * and - * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] - * are set in the response. - * @type string $next_page_token - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * @type string $corrected_query - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary $summary - * A summary as part of the search results. - * This field is only returned if - * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] - * is set. - * @type array|\Google\Protobuf\Internal\RepeatedField $applied_controls - * Controls applied as part of the Control service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * A list of matched documents. The order represents the ranking. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult results = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\SearchResult::class); - $this->results = $arr; - - return $this; - } - - /** - * Results of facets requested by user. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFacets() - { - return $this->facets; - } - - /** - * Results of facets requested by user. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet facets = 2; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFacets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet::class); - $this->facets = $arr; - - return $this; - } - - /** - * Guided search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult|null - */ - public function getGuidedSearchResult() - { - return $this->guided_search_result; - } - - public function hasGuidedSearchResult() - { - return isset($this->guided_search_result); - } - - public function clearGuidedSearchResult() - { - unset($this->guided_search_result); - } - - /** - * Guided search result. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult guided_search_result = 8; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult $var - * @return $this - */ - public function setGuidedSearchResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult::class); - $this->guided_search_result = $var; - - return $this; - } - - /** - * The estimated total count of matched items irrespective of pagination. The - * count of - * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The estimated total count of matched items irrespective of pagination. The - * count of - * [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] - * returned by pagination may be less than the - * [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] - * that matches. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - * @return string - */ - public function getAttributionToken() - { - return $this->attribution_token; - } - - /** - * A unique search token. This should be included in the - * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting - * from this search, which enables accurate attribution of search model - * performance. - * - * Generated from protobuf field string attribution_token = 4; - * @param string $var - * @return $this - */ - public function setAttributionToken($var) - { - GPBUtil::checkString($var, True); - $this->attribution_token = $var; - - return $this; - } - - /** - * The URI of a customer-defined redirect page. If redirect action is - * triggered, no search is performed, and only - * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] - * and - * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] - * are set in the response. - * - * Generated from protobuf field string redirect_uri = 12; - * @return string - */ - public function getRedirectUri() - { - return $this->redirect_uri; - } - - /** - * The URI of a customer-defined redirect page. If redirect action is - * triggered, no search is performed, and only - * [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] - * and - * [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] - * are set in the response. - * - * Generated from protobuf field string redirect_uri = 12; - * @param string $var - * @return $this - */ - public function setRedirectUri($var) - { - GPBUtil::checkString($var, True); - $this->redirect_uri = $var; - - return $this; - } - - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as - * [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - * to retrieve the next page. If this field is omitted, there are no - * subsequent pages. - * - * Generated from protobuf field string next_page_token = 5; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - * @return string - */ - public function getCorrectedQuery() - { - return $this->corrected_query; - } - - /** - * Contains the spell corrected query, if found. If the spell correction type - * is AUTOMATIC, then the search results are based on corrected_query. - * Otherwise the original query is used for search. - * - * Generated from protobuf field string corrected_query = 7; - * @param string $var - * @return $this - */ - public function setCorrectedQuery($var) - { - GPBUtil::checkString($var, True); - $this->corrected_query = $var; - - return $this; - } - - /** - * A summary as part of the search results. - * This field is only returned if - * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] - * is set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary|null - */ - public function getSummary() - { - return $this->summary; - } - - public function hasSummary() - { - return isset($this->summary); - } - - public function clearSummary() - { - unset($this->summary); - } - - /** - * A summary as part of the search results. - * This field is only returned if - * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] - * is set. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary $var - * @return $this - */ - public function setSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary::class); - $this->summary = $var; - - return $this; - } - - /** - * Controls applied as part of the Control service. - * - * Generated from protobuf field repeated string applied_controls = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppliedControls() - { - return $this->applied_controls; - } - - /** - * Controls applied as part of the Control service. - * - * Generated from protobuf field repeated string applied_controls = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppliedControls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->applied_controls = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php deleted file mode 100644 index 87856929100e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.Facet - */ -class Facet extends \Google\Protobuf\Internal\Message -{ - /** - * The key for this facet. E.g., "colors" or "price". It matches - * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The facet values for this field. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; - */ - private $values; - /** - * Whether the facet is dynamically generated. - * - * Generated from protobuf field bool dynamic_facet = 3; - */ - protected $dynamic_facet = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The key for this facet. E.g., "colors" or "price". It matches - * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue>|\Google\Protobuf\Internal\RepeatedField $values - * The facet values for this field. - * @type bool $dynamic_facet - * Whether the facet is dynamically generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The key for this facet. E.g., "colors" or "price". It matches - * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key for this facet. E.g., "colors" or "price". It matches - * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The facet values for this field. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The facet values for this field. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue values = 2; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Facet\FacetValue::class); - $this->values = $arr; - - return $this; - } - - /** - * Whether the facet is dynamically generated. - * - * Generated from protobuf field bool dynamic_facet = 3; - * @return bool - */ - public function getDynamicFacet() - { - return $this->dynamic_facet; - } - - /** - * Whether the facet is dynamically generated. - * - * Generated from protobuf field bool dynamic_facet = 3; - * @param bool $var - * @return $this - */ - public function setDynamicFacet($var) - { - GPBUtil::checkBool($var); - $this->dynamic_facet = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Facet::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Facet::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php deleted file mode 100644 index a061654a1dd4..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Facet/FacetValue.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue - */ -class FacetValue extends \Google\Protobuf\Internal\Message -{ - /** - * Number of items that have this facet value. - * - * Generated from protobuf field int64 count = 3; - */ - protected $count = 0; - protected $facet_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * Text value of a facet, such as "Black" for facet "colors". - * @type \Google\Cloud\DiscoveryEngine\V1beta\Interval $interval - * Interval value for a facet, such as [10, 20) for facet "price". It - * matches - * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * @type int|string $count - * Number of items that have this facet value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Text value of a facet, such as "Black" for facet "colors". - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->readOneof(1); - } - - public function hasValue() - { - return $this->hasOneof(1); - } - - /** - * Text value of a facet, such as "Black" for facet "colors". - * - * Generated from protobuf field string value = 1; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Interval value for a facet, such as [10, 20) for facet "price". It - * matches - * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Interval interval = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Interval|null - */ - public function getInterval() - { - return $this->readOneof(2); - } - - public function hasInterval() - { - return $this->hasOneof(2); - } - - /** - * Interval value for a facet, such as [10, 20) for facet "price". It - * matches - * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Interval interval = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Interval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Interval::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Number of items that have this facet value. - * - * Generated from protobuf field int64 count = 3; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Number of items that have this facet value. - * - * Generated from protobuf field int64 count = 3; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * @return string - */ - public function getFacetValue() - { - return $this->whichOneof("facet_value"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FacetValue::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Facet_FacetValue::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php deleted file mode 100644 index fd88c9f9b919..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult - */ -class GuidedSearchResult extends \Google\Protobuf\Internal\Message -{ - /** - * A list of ranked refinement attributes. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; - */ - private $refinement_attributes; - /** - * Suggested follow-up questions. - * - * Generated from protobuf field repeated string follow_up_questions = 2; - */ - private $follow_up_questions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute>|\Google\Protobuf\Internal\RepeatedField $refinement_attributes - * A list of ranked refinement attributes. - * @type array|\Google\Protobuf\Internal\RepeatedField $follow_up_questions - * Suggested follow-up questions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * A list of ranked refinement attributes. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRefinementAttributes() - { - return $this->refinement_attributes; - } - - /** - * A list of ranked refinement attributes. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRefinementAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult\RefinementAttribute::class); - $this->refinement_attributes = $arr; - - return $this; - } - - /** - * Suggested follow-up questions. - * - * Generated from protobuf field repeated string follow_up_questions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFollowUpQuestions() - { - return $this->follow_up_questions; - } - - /** - * Suggested follow-up questions. - * - * Generated from protobuf field repeated string follow_up_questions = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFollowUpQuestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->follow_up_questions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GuidedSearchResult::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_GuidedSearchResult::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php deleted file mode 100644 index 2dacacbe760f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/GuidedSearchResult/RefinementAttribute.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute - */ -class RefinementAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * Attribute key used to refine the results e.g. 'movie_type'. - * - * Generated from protobuf field string attribute_key = 1; - */ - protected $attribute_key = ''; - /** - * Attribute value used to refine the results e.g. 'drama'. - * - * Generated from protobuf field string attribute_value = 2; - */ - protected $attribute_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute_key - * Attribute key used to refine the results e.g. 'movie_type'. - * @type string $attribute_value - * Attribute value used to refine the results e.g. 'drama'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * Attribute key used to refine the results e.g. 'movie_type'. - * - * Generated from protobuf field string attribute_key = 1; - * @return string - */ - public function getAttributeKey() - { - return $this->attribute_key; - } - - /** - * Attribute key used to refine the results e.g. 'movie_type'. - * - * Generated from protobuf field string attribute_key = 1; - * @param string $var - * @return $this - */ - public function setAttributeKey($var) - { - GPBUtil::checkString($var, True); - $this->attribute_key = $var; - - return $this; - } - - /** - * Attribute value used to refine the results e.g. 'drama'. - * - * Generated from protobuf field string attribute_value = 2; - * @return string - */ - public function getAttributeValue() - { - return $this->attribute_value; - } - - /** - * Attribute value used to refine the results e.g. 'drama'. - * - * Generated from protobuf field string attribute_value = 2; - * @param string $var - * @return $this - */ - public function setAttributeValue($var) - { - GPBUtil::checkString($var, True); - $this->attribute_value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RefinementAttribute::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_GuidedSearchResult_RefinementAttribute::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php deleted file mode 100644 index 21d63cea47cb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/SearchResult.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult - */ -class SearchResult extends \Google\Protobuf\Internal\Message -{ - /** - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - */ - protected $document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1beta.Document]. - * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the - * searched [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The document data snippet in the search response. Only fields that are - * marked as retrievable are populated. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 2; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->document = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchResult::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_SearchResult::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php deleted file mode 100644 index cd250b9d01d9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/SearchResponse/Summary.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.discoveryengine.v1beta.SearchResponse.Summary - */ -class Summary extends \Google\Protobuf\Internal\Message -{ - /** - * The summary content. - * - * Generated from protobuf field string summary_text = 1; - */ - protected $summary_text = ''; - /** - * Additional summary-skipped reasons. This provides the reason for ignored - * cases. If nothing is skipped, this field is not set. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; - */ - private $summary_skipped_reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $summary_text - * The summary content. - * @type array|\Google\Protobuf\Internal\RepeatedField $summary_skipped_reasons - * Additional summary-skipped reasons. This provides the reason for ignored - * cases. If nothing is skipped, this field is not set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); - parent::__construct($data); - } - - /** - * The summary content. - * - * Generated from protobuf field string summary_text = 1; - * @return string - */ - public function getSummaryText() - { - return $this->summary_text; - } - - /** - * The summary content. - * - * Generated from protobuf field string summary_text = 1; - * @param string $var - * @return $this - */ - public function setSummaryText($var) - { - GPBUtil::checkString($var, True); - $this->summary_text = $var; - - return $this; - } - - /** - * Additional summary-skipped reasons. This provides the reason for ignored - * cases. If nothing is skipped, this field is not set. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSummarySkippedReasons() - { - return $this->summary_skipped_reasons; - } - - /** - * Additional summary-skipped reasons. This provides the reason for ignored - * cases. If nothing is skipped, this field is not set. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSummarySkippedReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\SummarySkippedReason::class); - $this->summary_skipped_reasons = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Summary::class, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse_Summary::class); - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php deleted file mode 100644 index cf9532eaddbb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/TransactionInfo.php +++ /dev/null @@ -1,377 +0,0 @@ -google.cloud.discoveryengine.v1beta.TransactionInfo - */ -class TransactionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = null; - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $currency = ''; - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - */ - protected $transaction_id = ''; - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - */ - protected $tax = null; - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - */ - protected $cost = null; - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - */ - protected $discount_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $value - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * @type string $currency - * Required. Currency code. Use three-character ISO-4217 code. - * @type string $transaction_id - * The transaction ID with a length limit of 128 characters. - * @type float $tax - * All the taxes associated with the transaction. - * @type float $cost - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * @type float $discount_value - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getValue() - { - return isset($this->value) ? $this->value : 0.0; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * Required. Total non-zero value associated with the transaction. This value - * may include shipping, tax, or other adjustments to the total value that you - * want to include. - * - * Generated from protobuf field optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkFloat($var); - $this->value = $var; - - return $this; - } - - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * Required. Currency code. Use three-character ISO-4217 code. - * - * Generated from protobuf field string currency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCurrency($var) - { - GPBUtil::checkString($var, True); - $this->currency = $var; - - return $this; - } - - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - * @return string - */ - public function getTransactionId() - { - return $this->transaction_id; - } - - /** - * The transaction ID with a length limit of 128 characters. - * - * Generated from protobuf field string transaction_id = 3; - * @param string $var - * @return $this - */ - public function setTransactionId($var) - { - GPBUtil::checkString($var, True); - $this->transaction_id = $var; - - return $this; - } - - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - * @return float - */ - public function getTax() - { - return isset($this->tax) ? $this->tax : 0.0; - } - - public function hasTax() - { - return isset($this->tax); - } - - public function clearTax() - { - unset($this->tax); - } - - /** - * All the taxes associated with the transaction. - * - * Generated from protobuf field optional float tax = 4; - * @param float $var - * @return $this - */ - public function setTax($var) - { - GPBUtil::checkFloat($var); - $this->tax = $var; - - return $this; - } - - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - * @return float - */ - public function getCost() - { - return isset($this->cost) ? $this->cost : 0.0; - } - - public function hasCost() - { - return isset($this->cost); - } - - public function clearCost() - { - unset($this->cost); - } - - /** - * All the costs associated with the products. These can be manufacturing - * costs, shipping expenses not borne by the end user, or any other costs, - * such that: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float cost = 5; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkFloat($var); - $this->cost = $var; - - return $this; - } - - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - * @return float - */ - public function getDiscountValue() - { - return isset($this->discount_value) ? $this->discount_value : 0.0; - } - - public function hasDiscountValue() - { - return isset($this->discount_value); - } - - public function clearDiscountValue() - { - unset($this->discount_value); - } - - /** - * The total discount(s) value applied to this transaction. - * This figure should be excluded from - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * For example, if a user paid - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * amount, then nominal (pre-discount) value of the transaction is the sum of - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - * and - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * This means that profit is calculated the same way, regardless of the - * discount value, and that - * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] - * can be larger than - * [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: - * * Profit = - * [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - * [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - * [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] - * - * Generated from protobuf field optional float discount_value = 6; - * @param float $var - * @return $this - */ - public function setDiscountValue($var) - { - GPBUtil::checkFloat($var); - $this->discount_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php deleted file mode 100644 index 7911356efc97..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateDocumentRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.discoveryengine.v1beta.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update - * does not exist and - * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a - * new [Document][google.cloud.discoveryengine.v1beta.Document] will be - * created. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\Document $document - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update - * does not exist and - * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * @type bool $allow_missing - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a - * new [Document][google.cloud.discoveryengine.v1beta.Document] will be - * created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update - * does not exist and - * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to update/create. - * If the caller does not have permission to update the - * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - * whether or not it exists, a `PERMISSION_DENIED` error is returned. - * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update - * does not exist and - * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - * is not set, a `NOT_FOUND` error is returned. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Document::class); - $this->document = $var; - - return $this; - } - - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a - * new [Document][google.cloud.discoveryengine.v1beta.Document] will be - * created. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a - * new [Document][google.cloud.discoveryengine.v1beta.Document] will be - * created. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php deleted file mode 100644 index dd16a0254cfe..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata - */ -class UpdateSchemaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Operation create time. - * @type \Google\Protobuf\Timestamp $update_time - * Operation last update time. If the operation is done, this is also the - * finish time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Operation create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Operation last update time. If the operation is done, this is also the - * finish time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php deleted file mode 100644 index 86c984cde2e3..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UpdateSchemaRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.discoveryengine.v1beta.UpdateSchemaRequest - */ -class UpdateSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - /** - * If set to true, and the - * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new - * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In - * this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DiscoveryEngine\V1beta\Schema $schema - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * update. - * @type bool $allow_missing - * If set to true, and the - * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new - * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In - * this situation, `update_mask` is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SchemaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to - * update. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Schema::class); - $this->schema = $var; - - return $this; - } - - /** - * If set to true, and the - * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new - * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In - * this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new - * [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In - * this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php deleted file mode 100644 index 80ed22beed6d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserEvent.php +++ /dev/null @@ -1,1186 +0,0 @@ -google.cloud.discoveryengine.v1beta.UserEvent - */ -class UserEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_type = ''; - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_pseudo_id = ''; - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - */ - protected $event_time = null; - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; - */ - protected $user_info = null; - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - */ - protected $direct_user_request = false; - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - */ - protected $session_id = ''; - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; - */ - protected $page_info = null; - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * This field enables accurate attribution of recommendation model - * performance. - * The value must be one of: - * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * as a URL parameter to product K's page. When recording events on product - * K's page, log the - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * to this field. - * - * Generated from protobuf field string attribution_token = 8; - */ - protected $attribution_token = ''; - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may - * contain a filter expression in - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * conforming to https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string filter = 9; - */ - protected $filter = ''; - /** - * List of [Document][google.cloud.discoveryengine.v1beta.Document]s - * associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; - */ - private $documents; - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; - */ - protected $panel = null; - /** - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; - */ - protected $search_info = null; - /** - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - * details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; - */ - protected $completion_info = null; - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; - */ - protected $transaction_info = null; - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - */ - private $tag_ids; - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - */ - private $promotion_ids; - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * `traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - */ - private $attributes; - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; - */ - protected $media_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $event_type - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @type string $user_pseudo_id - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * @type \Google\Protobuf\Timestamp $event_time - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * @type \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $user_info - * Information about the end user. - * @type bool $direct_user_request - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. - * @type string $session_id - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * as prefix. - * @type \Google\Cloud\DiscoveryEngine\V1beta\PageInfo $page_info - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * @type string $attribution_token - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * This field enables accurate attribution of recommendation model - * performance. - * The value must be one of: - * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * as a URL parameter to product K's page. When recording events on product - * K's page, log the - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * to this field. - * @type string $filter - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may - * contain a filter expression in - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * conforming to https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type array<\Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents - * List of [Document][google.cloud.discoveryengine.v1beta.Document]s - * associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] - * is desired. - * @type \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo $panel - * Panel metadata associated with this user event. - * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo $search_info - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * details related to the event. - * This field should be set for `search` event. - * @type \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo $completion_info - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - * details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * @type \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo $transaction_info - * The transaction metadata (if any) associated with this user event. - * @type array|\Google\Protobuf\Internal\RepeatedField $tag_ids - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * @type array|\Google\Protobuf\Internal\RepeatedField $promotion_ids - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * `traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * @type \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo $media_info - * Media-specific info. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Required. User event type. Allowed values are: - * Generic values: - * * `search`: Search for Documents. - * * `view-item`: Detailed page view of a Document. - * * `view-item-list`: View of a panel or ordered list of Documents. - * * `view-home-page`: View of the home page. - * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * Retail-related values: - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * Media-related values: - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * - * Generated from protobuf field string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserPseudoId() - { - return $this->user_pseudo_id; - } - - /** - * Required. A unique identifier for tracking visitors. - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - * - * Generated from protobuf field string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserPseudoId($var) - { - GPBUtil::checkString($var, True); - $this->user_pseudo_id = $var; - - return $this; - } - - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Only required for - * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] - * method. Timestamp of when the user event happened. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; - * @return \Google\Cloud\DiscoveryEngine\V1beta\UserInfo|null - */ - public function getUserInfo() - { - return $this->user_info; - } - - public function hasUserInfo() - { - return isset($this->user_info); - } - - public function clearUserInfo() - { - unset($this->user_info); - } - - /** - * Information about the end user. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; - * @param \Google\Cloud\DiscoveryEngine\V1beta\UserInfo $var - * @return $this - */ - public function setUserInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserInfo::class); - $this->user_info = $var; - - return $this; - } - - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - * @return bool - */ - public function getDirectUserRequest() - { - return $this->direct_user_request; - } - - /** - * Should set to true if the request is made directly from the end user, in - * which case the - * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] - * can be populated from the HTTP request. - * This flag should be set only if the API request is made directly from the - * end user such as a mobile app (and not if a gateway or a server is - * processing and pushing the user events). - * This should not be set when using the JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. - * - * Generated from protobuf field bool direct_user_request = 5; - * @param bool $var - * @return $this - */ - public function setDirectUserRequest($var) - { - GPBUtil::checkBool($var); - $this->direct_user_request = $var; - - return $this; - } - - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * A unique identifier for tracking a visitor session with a length limit of - * 128 bytes. A session is an aggregation of an end user behavior in a time - * span. - * A general guideline to populate the session_id: - * 1. If user has no activity for 30 min, a new session_id should be assigned. - * 2. The session_id should be unique across users, suggest use uuid or add - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * as prefix. - * - * Generated from protobuf field string session_id = 6; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; - * @return \Google\Cloud\DiscoveryEngine\V1beta\PageInfo|null - */ - public function getPageInfo() - { - return $this->page_info; - } - - public function hasPageInfo() - { - return isset($this->page_info); - } - - public function clearPageInfo() - { - unset($this->page_info); - } - - /** - * Page metadata such as categories and other critical information for certain - * event types such as `view-category-page`. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; - * @param \Google\Cloud\DiscoveryEngine\V1beta\PageInfo $var - * @return $this - */ - public function setPageInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\PageInfo::class); - $this->page_info = $var; - - return $this; - } - - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * This field enables accurate attribution of recommendation model - * performance. - * The value must be one of: - * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * as a URL parameter to product K's page. When recording events on product - * K's page, log the - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * to this field. - * - * Generated from protobuf field string attribution_token = 8; - * @return string - */ - public function getAttributionToken() - { - return $this->attribution_token; - } - - /** - * Token to attribute an API response to user action(s) to trigger the event. - * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * This field enables accurate attribution of recommendation model - * performance. - * The value must be one of: - * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of - * [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - * This token enables us to accurately attribute page view or conversion - * completion back to the event and the particular predict response containing - * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * as a URL parameter to product K's page. When recording events on product - * K's page, log the - * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - * to this field. - * - * Generated from protobuf field string attribution_token = 8; - * @param string $var - * @return $this - */ - public function setAttributionToken($var) - { - GPBUtil::checkString($var, True); - $this->attribution_token = $var; - - return $this; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may - * contain a filter expression in - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * conforming to https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string filter = 9; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter syntax consists of an expression language for constructing a - * predicate from one or more fields of the documents being filtered. - * One example is for `search` events, the associated - * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may - * contain a filter expression in - * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - * conforming to https://google.aip.dev/160#filtering. - * Similarly, for `view-item-list` events that are generated from a - * [RecommendationService.RecommendRequest][], this field may be populated - * directly from [RecommendationService.RecommendRequest.filter][] conforming - * to https://google.aip.dev/160#filtering. - * The value must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string filter = 9; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * List of [Document][google.cloud.discoveryengine.v1beta.Document]s - * associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * List of [Document][google.cloud.discoveryengine.v1beta.Document]s - * associated with this user event. - * This field is optional except for the following event types: - * * `view-item` - * * `add-to-cart` - * * `purchase` - * * `media-play` - * * `media-complete` - * In a `search` event, this field represents the documents returned to the - * end user on the current page (the end user may have not finished browsing - * the whole page yet). When a new page is returned to the end user, after - * pagination/filtering/ordering even for the same query, a new `search` event - * with different - * [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] - * is desired. - * - * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.DocumentInfo documents = 10; - * @param array<\Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\DocumentInfo::class); - $this->documents = $arr; - - return $this; - } - - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; - * @return \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo|null - */ - public function getPanel() - { - return $this->panel; - } - - public function hasPanel() - { - return isset($this->panel); - } - - public function clearPanel() - { - unset($this->panel); - } - - /** - * Panel metadata associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; - * @param \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo $var - * @return $this - */ - public function setPanel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\PanelInfo::class); - $this->panel = $var; - - return $this; - } - - /** - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; - * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo|null - */ - public function getSearchInfo() - { - return $this->search_info; - } - - public function hasSearchInfo() - { - return isset($this->search_info); - } - - public function clearSearchInfo() - { - unset($this->search_info); - } - - /** - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * details related to the event. - * This field should be set for `search` event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; - * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo $var - * @return $this - */ - public function setSearchInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchInfo::class); - $this->search_info = $var; - - return $this; - } - - /** - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - * details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; - * @return \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo|null - */ - public function getCompletionInfo() - { - return $this->completion_info; - } - - public function hasCompletionInfo() - { - return isset($this->completion_info); - } - - public function clearCompletionInfo() - { - unset($this->completion_info); - } - - /** - * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - * details related to the event. - * This field should be set for `search` event when autocomplete function is - * enabled and the user clicks a suggestion for search. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; - * @param \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo $var - * @return $this - */ - public function setCompletionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\CompletionInfo::class); - $this->completion_info = $var; - - return $this; - } - - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; - * @return \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo|null - */ - public function getTransactionInfo() - { - return $this->transaction_info; - } - - public function hasTransactionInfo() - { - return isset($this->transaction_info); - } - - public function clearTransactionInfo() - { - unset($this->transaction_info); - } - - /** - * The transaction metadata (if any) associated with this user event. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; - * @param \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo $var - * @return $this - */ - public function setTransactionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\TransactionInfo::class); - $this->transaction_info = $var; - - return $this; - } - - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTagIds() - { - return $this->tag_ids; - } - - /** - * A list of identifiers for the independent experiment groups this user event - * belongs to. This is used to distinguish between user events associated with - * different experiment setups on the customer end. - * - * Generated from protobuf field repeated string tag_ids = 15; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTagIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tag_ids = $arr; - - return $this; - } - - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPromotionIds() - { - return $this->promotion_ids; - } - - /** - * The promotion IDs if this is an event associated with promotions. - * Currently, this field is restricted to at most one ID. - * - * Generated from protobuf field repeated string promotion_ids = 16; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPromotionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->promotion_ids = $arr; - - return $this; - } - - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * `traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Extra user event features to include in the recommendation model. - * These attributes must NOT contain data that needs to be parsed or processed - * further, e.g. JSON or other encodings. - * If you provide custom attributes for ingested user events, also include - * them in the user events that you associate with prediction requests. Custom - * attribute formatting must be consistent between imported events and events - * provided with prediction requests. This lets the Discovery Engine API use - * those custom attributes when training models and serving predictions, which - * helps improve recommendation quality. - * This field needs to pass all below criteria, otherwise an - * `INVALID_ARGUMENT` error is returned: - * * The key must be a UTF-8 encoded string with a length limit of 5,000 - * characters. - * * For text attributes, at most 400 values are allowed. Empty values are not - * allowed. Each value must be a UTF-8 encoded string with a length limit of - * 256 characters. - * * For number attributes, at most 400 values are allowed. - * For product recommendations, an example of extra user information is - * `traffic_channel`, which is how a user arrives at the site. Users can - * arrive - * at the site by coming to the site directly, coming through Google - * search, or in other ways. - * - * Generated from protobuf field map attributes = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\CustomAttribute::class); - $this->attributes = $arr; - - return $this; - } - - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; - * @return \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo|null - */ - public function getMediaInfo() - { - return $this->media_info; - } - - public function hasMediaInfo() - { - return isset($this->media_info); - } - - public function clearMediaInfo() - { - unset($this->media_info); - } - - /** - * Media-specific info. - * - * Generated from protobuf field .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; - * @param \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo $var - * @return $this - */ - public function setMediaInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\MediaInfo::class); - $this->media_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php deleted file mode 100644 index 5684be976bb2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/UserInfo.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.discoveryengine.v1beta.UserInfo - */ -class UserInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - */ - protected $user_id = ''; - /** - * User agent as included in the HTTP header. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - */ - protected $user_agent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user_id - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * @type string $user_agent - * User agent as included in the HTTP header. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] - * is set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Common::initOnce(); - parent::__construct($data); - } - - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Highly recommended for logged-in users. Unique identifier for logged-in - * user, such as a user name. Don't set for anonymous users. - * Always use a hashed value for this ID. - * Don't set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded - * model quality. - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string user_id = 1; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * User agent as included in the HTTP header. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * User agent as included in the HTTP header. - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] - * is set. - * - * Generated from protobuf field string user_agent = 2; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php b/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php deleted file mode 100644 index 0160c406ea4a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/proto/src/Google/Cloud/DiscoveryEngine/V1beta/WriteUserEventRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.discoveryengine.v1beta.WriteUserEventRequest - */ -class WriteUserEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_event = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * @type \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $user_event - * Required. User event to write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\UserEventService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent DataStore resource name, such as - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DiscoveryEngine\V1beta\UserEvent|null - */ - public function getUserEvent() - { - return $this->user_event; - } - - public function hasUserEvent() - { - return isset($this->user_event); - } - - public function clearUserEvent() - { - unset($this->user_event); - } - - /** - * Required. User event to write. - * - * Generated from protobuf field optional .google.cloud.discoveryengine.v1beta.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DiscoveryEngine\V1beta\UserEvent $var - * @return $this - */ - public function setUserEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\UserEvent::class); - $this->user_event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php deleted file mode 100644 index 9c189002c471..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/CompletionServiceClient/complete_query.php +++ /dev/null @@ -1,81 +0,0 @@ -setDataStore($formattedDataStore) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var CompleteQueryResponse $response */ - $response = $completionServiceClient->completeQuery($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedDataStore = CompletionServiceClient::dataStoreName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]' - ); - $query = '[QUERY]'; - - complete_query_sample($formattedDataStore, $query); -} -// [END discoveryengine_v1beta_generated_CompletionService_CompleteQuery_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php deleted file mode 100644 index a8e46998d290..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/create_document.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->createDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($formattedParent, $documentId); -} -// [END discoveryengine_v1beta_generated_DocumentService_CreateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php deleted file mode 100644 index 7e1f97e9fd13..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/delete_document.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $documentServiceClient->deleteDocument($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentServiceClient::documentName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]', - '[DOCUMENT]' - ); - - delete_document_sample($formattedName); -} -// [END discoveryengine_v1beta_generated_DocumentService_DeleteDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php deleted file mode 100644 index f0244698e8d9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/get_document.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->getDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentServiceClient::documentName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]', - '[DOCUMENT]' - ); - - get_document_sample($formattedName); -} -// [END discoveryengine_v1beta_generated_DocumentService_GetDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php deleted file mode 100644 index a7878c9ca678..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/import_documents.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentServiceClient->importDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - - import_documents_sample($formattedParent); -} -// [END discoveryengine_v1beta_generated_DocumentService_ImportDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php deleted file mode 100644 index e988fa91ef9b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/list_documents.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentServiceClient->listDocuments($request); - - /** @var Document $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - - list_documents_sample($formattedParent); -} -// [END discoveryengine_v1beta_generated_DocumentService_ListDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php deleted file mode 100644 index 106df6d1c0ec..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/purge_documents.php +++ /dev/null @@ -1,110 +0,0 @@ -setParent($formattedParent) - ->setFilter($filter); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentServiceClient->purgeDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PurgeDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentServiceClient::branchName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[BRANCH]' - ); - $filter = '[FILTER]'; - - purge_documents_sample($formattedParent, $filter); -} -// [END discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php deleted file mode 100644 index 9ff84c5aa563..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/DocumentServiceClient/update_document.php +++ /dev/null @@ -1,59 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $documentServiceClient->updateDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END discoveryengine_v1beta_generated_DocumentService_UpdateDocument_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php deleted file mode 100644 index e22490379b2f..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/RecommendationServiceClient/recommend.php +++ /dev/null @@ -1,126 +0,0 @@ - Men > Jeans - * - * Retail-related values: - * - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * - * Media-related values: - * - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @param string $userEventUserPseudoId A unique identifier for tracking visitors. - * - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - */ -function recommend_sample( - string $formattedServingConfig, - string $userEventEventType, - string $userEventUserPseudoId -): void { - // Create a client. - $recommendationServiceClient = new RecommendationServiceClient(); - - // Prepare the request message. - $userEvent = (new UserEvent()) - ->setEventType($userEventEventType) - ->setUserPseudoId($userEventUserPseudoId); - $request = (new RecommendRequest()) - ->setServingConfig($formattedServingConfig) - ->setUserEvent($userEvent); - - // Call the API and handle any network failures. - try { - /** @var RecommendResponse $response */ - $response = $recommendationServiceClient->recommend($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedServingConfig = RecommendationServiceClient::servingConfigName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SERVING_CONFIG]' - ); - $userEventEventType = '[EVENT_TYPE]'; - $userEventUserPseudoId = '[USER_PSEUDO_ID]'; - - recommend_sample($formattedServingConfig, $userEventEventType, $userEventUserPseudoId); -} -// [END discoveryengine_v1beta_generated_RecommendationService_Recommend_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php deleted file mode 100644 index 8b59f61f95ab..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/create_schema.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->createSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schema $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schemaId = '[SCHEMA_ID]'; - - create_schema_sample($formattedParent, $schemaId); -} -// [END discoveryengine_v1beta_generated_SchemaService_CreateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php deleted file mode 100644 index 88465c02b0c4..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/delete_schema.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->deleteSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SchemaServiceClient::schemaName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SCHEMA]' - ); - - delete_schema_sample($formattedName); -} -// [END discoveryengine_v1beta_generated_SchemaService_DeleteSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php deleted file mode 100644 index fe9bad536488..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/get_schema.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Schema $response */ - $response = $schemaServiceClient->getSchema($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SchemaServiceClient::schemaName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SCHEMA]' - ); - - get_schema_sample($formattedName); -} -// [END discoveryengine_v1beta_generated_SchemaService_GetSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php deleted file mode 100644 index 6cc72cd99c30..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/list_schemas.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $schemaServiceClient->listSchemas($request); - - /** @var Schema $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SchemaServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - - list_schemas_sample($formattedParent); -} -// [END discoveryengine_v1beta_generated_SchemaService_ListSchemas_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php deleted file mode 100644 index 4634c84a3008..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SchemaServiceClient/update_schema.php +++ /dev/null @@ -1,71 +0,0 @@ -setSchema($schema); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $schemaServiceClient->updateSchema($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schema $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END discoveryengine_v1beta_generated_SchemaService_UpdateSchema_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php deleted file mode 100644 index eccb5311c97c..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/SearchServiceClient/search.php +++ /dev/null @@ -1,84 +0,0 @@ -setServingConfig($formattedServingConfig); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $searchServiceClient->search($request); - - /** @var SearchResult $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedServingConfig = SearchServiceClient::servingConfigName( - '[PROJECT]', - '[LOCATION]', - '[DATA_STORE]', - '[SERVING_CONFIG]' - ); - - search_sample($formattedServingConfig); -} -// [END discoveryengine_v1beta_generated_SearchService_Search_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php deleted file mode 100644 index 84f50ea1967d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/collect_user_event.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setUserEvent($userEvent); - - // Call the API and handle any network failures. - try { - /** @var HttpBody $response */ - $response = $userEventServiceClient->collectUserEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = '[USER_EVENT]'; - - collect_user_event_sample($formattedParent, $userEvent); -} -// [END discoveryengine_v1beta_generated_UserEventService_CollectUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php deleted file mode 100644 index e038496755cd..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/import_user_events.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $userEventServiceClient->importUserEvents($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportUserEventsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - - import_user_events_sample($formattedParent); -} -// [END discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php b/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php deleted file mode 100644 index eaf89dfa96f2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/samples/V1beta/UserEventServiceClient/write_user_event.php +++ /dev/null @@ -1,117 +0,0 @@ - Men > Jeans - * - * Retail-related values: - * - * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping - * * `purchase`: Purchase an item(s) - * - * Media-related values: - * - * * `media-play`: Start/resume watching a video, playing a song, etc. - * * `media-complete`: Finished or stopped midway through a video, song, etc. - * @param string $userEventUserPseudoId A unique identifier for tracking visitors. - * - * For example, this could be implemented with an HTTP cookie, which should be - * able to uniquely identify a visitor on a single device. This unique - * identifier should not change if the visitor log in/out of the website. - * - * Do not set the field to the same fixed ID for different users. This mixes - * the event history of those users together, which results in degraded model - * quality. - * - * The field must be a UTF-8 encoded string with a length limit of 128 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - * - * The field should not contain PII or user-data. We recommend to use Google - * Analytics [Client - * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - * for this field. - */ -function write_user_event_sample( - string $formattedParent, - string $userEventEventType, - string $userEventUserPseudoId -): void { - // Create a client. - $userEventServiceClient = new UserEventServiceClient(); - - // Prepare the request message. - $userEvent = (new UserEvent()) - ->setEventType($userEventEventType) - ->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - - // Call the API and handle any network failures. - try { - /** @var UserEvent $response */ - $response = $userEventServiceClient->writeUserEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = UserEventServiceClient::dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEventEventType = '[EVENT_TYPE]'; - $userEventUserPseudoId = '[USER_PSEUDO_ID]'; - - write_user_event_sample($formattedParent, $userEventEventType, $userEventUserPseudoId); -} -// [END discoveryengine_v1beta_generated_UserEventService_WriteUserEvent_sync] diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php deleted file mode 100644 index 48186a09aeab..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/CompletionServiceBaseClient.php +++ /dev/null @@ -1,294 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/completion_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/completion_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/completion_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/completion_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - * - * @experimental - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - * - * @experimental - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Completes the specified user input with keyword suggestions. - * - * The async variant is {@see self::completeQueryAsync()} . - * - * @example samples/V1beta/CompletionServiceClient/complete_query.php - * - * @param CompleteQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CompleteQueryResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse - { - return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php deleted file mode 100644 index 681ae376df2d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/DocumentServiceBaseClient.php +++ /dev/null @@ -1,622 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/document_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/document_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/document_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/document_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a branch - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted branch resource. - * - * @experimental - */ - public static function branchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('branch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted document resource. - * - * @experimental - */ - public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('document')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_collection_data_store_branch resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_collection_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_data_store_branch resource. - * - * @experimental - */ - public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * The async variant is {@see self::createDocumentAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/create_document.php - * - * @param CreateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * The async variant is {@see self::deleteDocumentAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/delete_document.php - * - * @param DeleteDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); - } - - /** - * Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * The async variant is {@see self::getDocumentAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/get_document.php - * - * @param GetDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); - } - - /** - * Bulk import of multiple - * [Document][google.cloud.discoveryengine.v1beta.Document]s. Request - * processing may be synchronous. Non-existing items will be created. - * - * Note: It is possible for a subset of the - * [Document][google.cloud.discoveryengine.v1beta.Document]s to be - * successfully updated. - * - * The async variant is {@see self::importDocumentsAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/import_documents.php - * - * @param ImportDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); - } - - /** - * Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s. - * - * The async variant is {@see self::listDocumentsAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/list_documents.php - * - * @param ListDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDocuments', $request, $callOptions); - } - - /** - * Permanently deletes all selected - * [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch. - * - * This process is asynchronous. Depending on the number of - * [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, - * this operation can take hours to complete. Before the delete operation - * completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s - * might still be returned by - * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] - * or - * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. - * - * To get a list of the - * [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, - * set - * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] - * to false. - * - * The async variant is {@see self::purgeDocumentsAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/purge_documents.php - * - * @param PurgeDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function purgeDocuments(PurgeDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PurgeDocuments', $request, $callOptions)->wait(); - } - - /** - * Updates a [Document][google.cloud.discoveryengine.v1beta.Document]. - * - * The async variant is {@see self::updateDocumentAsync()} . - * - * @example samples/V1beta/DocumentServiceClient/update_document.php - * - * @param UpdateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php deleted file mode 100644 index 067af4b533f8..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/RecommendationServiceBaseClient.php +++ /dev/null @@ -1,380 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/recommendation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/recommendation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/recommendation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/recommendation_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted document resource. - * - * @experimental - */ - public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('document')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_collection_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_collection_data_store_serving_config resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_data_store_serving_config resource. - * - * @experimental - */ - public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted serving_config resource. - * - * @experimental - */ - public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('servingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} - * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Makes a recommendation, which requires a contextual user event. - * - * The async variant is {@see self::recommendAsync()} . - * - * @example samples/V1beta/RecommendationServiceClient/recommend.php - * - * @param RecommendRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RecommendResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function recommend(RecommendRequest $request, array $callOptions = []): RecommendResponse - { - return $this->startApiCall('Recommend', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php deleted file mode 100644 index 9936cab52f81..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SchemaServiceBaseClient.php +++ /dev/null @@ -1,528 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/schema_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/schema_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/schema_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/schema_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - * - * @experimental - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_schema resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $schema - * - * @return string The formatted project_location_collection_data_store_schema resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreSchemaName(string $project, string $location, string $collection, string $dataStore, string $schema): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreSchema')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - * - * @experimental - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_schema resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $schema - * - * @return string The formatted project_location_data_store_schema resource. - * - * @experimental - */ - public static function projectLocationDataStoreSchemaName(string $project, string $location, string $dataStore, string $schema): string - { - return self::getPathTemplate('projectLocationDataStoreSchema')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a schema - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $schema - * - * @return string The formatted schema resource. - * - * @experimental - */ - public static function schemaName(string $project, string $location, string $dataStore, string $schema): string - { - return self::getPathTemplate('schema')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'schema' => $schema, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationCollectionDataStoreSchema: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationDataStoreSchema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} - * - schema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. - * - * The async variant is {@see self::createSchemaAsync()} . - * - * @example samples/V1beta/SchemaServiceClient/create_schema.php - * - * @param CreateSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createSchema(CreateSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSchema', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. - * - * The async variant is {@see self::deleteSchemaAsync()} . - * - * @example samples/V1beta/SchemaServiceClient/delete_schema.php - * - * @param DeleteSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteSchema(DeleteSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSchema', $request, $callOptions)->wait(); - } - - /** - * Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. - * - * The async variant is {@see self::getSchemaAsync()} . - * - * @example samples/V1beta/SchemaServiceClient/get_schema.php - * - * @param GetSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Schema - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getSchema(GetSchemaRequest $request, array $callOptions = []): Schema - { - return $this->startApiCall('GetSchema', $request, $callOptions)->wait(); - } - - /** - * Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s. - * - * The async variant is {@see self::listSchemasAsync()} . - * - * @example samples/V1beta/SchemaServiceClient/list_schemas.php - * - * @param ListSchemasRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listSchemas(ListSchemasRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSchemas', $request, $callOptions); - } - - /** - * Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. - * - * The async variant is {@see self::updateSchemaAsync()} . - * - * @example samples/V1beta/SchemaServiceClient/update_schema.php - * - * @param UpdateSchemaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateSchema(UpdateSchemaRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSchema', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php deleted file mode 100644 index 6efc66cc3d3d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/SearchServiceBaseClient.php +++ /dev/null @@ -1,374 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/search_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/search_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/search_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/search_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a branch - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted branch resource. - * - * @experimental - */ - public static function branchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('branch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_collection_data_store_branch resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreBranchName(string $project, string $location, string $collection, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_collection_data_store_serving_config resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreServingConfigName(string $project, string $location, string $collection, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * - * @return string The formatted project_location_data_store_branch resource. - * - * @experimental - */ - public static function projectLocationDataStoreBranchName(string $project, string $location, string $dataStore, string $branch): string - { - return self::getPathTemplate('projectLocationDataStoreBranch')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted project_location_data_store_serving_config resource. - * - * @experimental - */ - public static function projectLocationDataStoreServingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * serving_config resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $servingConfig - * - * @return string The formatted serving_config resource. - * - * @experimental - */ - public static function servingConfigName(string $project, string $location, string $dataStore, string $servingConfig): string - { - return self::getPathTemplate('servingConfig')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'serving_config' => $servingConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} - * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} - * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} - * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Performs a search. - * - * The async variant is {@see self::searchAsync()} . - * - * @example samples/V1beta/SearchServiceClient/search.php - * - * @param SearchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function search(SearchRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('Search', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php deleted file mode 100644 index 2ffbe7f091a9..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/BaseClient/UserEventServiceBaseClient.php +++ /dev/null @@ -1,484 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/user_event_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/user_event_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/user_event_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/user_event_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - * - * @experimental - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a document - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted document resource. - * - * @experimental - */ - public static function documentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('document')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_collection_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationCollectionDataStoreBranchDocumentName(string $project, string $location, string $collection, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - * - * @experimental - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store_branch_document resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * @param string $branch - * @param string $document - * - * @return string The formatted project_location_data_store_branch_document resource. - * - * @experimental - */ - public static function projectLocationDataStoreBranchDocumentName(string $project, string $location, string $dataStore, string $branch, string $document): string - { - return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - 'branch' => $branch, - 'document' => $document, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'discoveryengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Writes a single user event from the browser. This uses a GET request to - * due to browser restriction of POST-ing to a third-party domain. - * - * This method is used only by the Discovery Engine API JavaScript pixel and - * Google Tag Manager. Users should not call this method directly. - * - * The async variant is {@see self::collectUserEventAsync()} . - * - * @example samples/V1beta/UserEventServiceClient/collect_user_event.php - * - * @param CollectUserEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HttpBody - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function collectUserEvent(CollectUserEventRequest $request, array $callOptions = []): HttpBody - { - return $this->startApiCall('CollectUserEvent', $request, $callOptions)->wait(); - } - - /** - * Bulk import of User events. Request processing might be - * synchronous. Events that already exist are skipped. - * Use this method for backfilling historical user events. - * - * Operation.response is of type ImportResponse. Note that it is - * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. - * - * The async variant is {@see self::importUserEventsAsync()} . - * - * @example samples/V1beta/UserEventServiceClient/import_user_events.php - * - * @param ImportUserEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function importUserEvents(ImportUserEventsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportUserEvents', $request, $callOptions)->wait(); - } - - /** - * Writes a single user event. - * - * The async variant is {@see self::writeUserEventAsync()} . - * - * @example samples/V1beta/UserEventServiceClient/write_user_event.php - * - * @param WriteUserEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserEvent - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function writeUserEvent(WriteUserEventRequest $request, array $callOptions = []): UserEvent - { - return $this->startApiCall('WriteUserEvent', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php deleted file mode 100644 index 6855fab218e3..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/Client/CompletionServiceClient.php +++ /dev/null @@ -1,42 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.CompletionService' => [ - 'CompleteQuery' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\CompleteQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'data_store', - 'fieldAccessors' => [ - 'getDataStore', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php deleted file mode 100644 index ea503f4eecb8..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/completion_service_rest_client_config.php +++ /dev/null @@ -1,150 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.CompletionService' => [ - 'CompleteQuery' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery', - ], - ], - 'placeholders' => [ - 'data_store' => [ - 'getters' => [ - 'getDataStore', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json deleted file mode 100644 index f31c7d6b35f0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_client_config.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1beta.DocumentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ImportDocuments": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListDocuments": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "PurgeDocuments": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "UpdateDocument": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php deleted file mode 100644 index 743e3dc11bb5..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_descriptor_config.php +++ /dev/null @@ -1,123 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.DocumentService' => [ - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\PurgeDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\PurgeDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Document', - 'headerParams' => [ - [ - 'keyName' => 'document.name', - 'fieldAccessors' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php deleted file mode 100644 index 8427f0f2e1e1..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/document_service_rest_client_config.php +++ /dev/null @@ -1,267 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.DocumentService' => [ - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', - 'body' => 'document', - 'queryParams' => [ - 'document_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}', - 'body' => 'document', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}', - 'body' => 'document', - ], - ], - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json deleted file mode 100644 index 2e290adf1745..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1beta.RecommendationService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 5000, - "initial_rpc_timeout_millis": 5000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000, - "total_timeout_millis": 5000 - } - }, - "methods": { - "Recommend": { - "timeout_millis": 5000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php deleted file mode 100644 index 5dc3021feb5d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.RecommendationService' => [ - 'Recommend' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse', - 'headerParams' => [ - [ - 'keyName' => 'serving_config', - 'fieldAccessors' => [ - 'getServingConfig', - ], - ], - ], - ], - 'templateMap' => [ - 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php deleted file mode 100644 index b7d7dfd1bf0d..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/recommendation_service_rest_client_config.php +++ /dev/null @@ -1,152 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.RecommendationService' => [ - 'Recommend' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'serving_config' => [ - 'getters' => [ - 'getServingConfig', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json deleted file mode 100644 index a125a00926a2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1beta.SchemaService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListSchemas": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "UpdateSchema": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php deleted file mode 100644 index 190825f414a2..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_descriptor_config.php +++ /dev/null @@ -1,106 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.SchemaService' => [ - 'CreateSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\Schema', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\CreateSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\DeleteSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSchema' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\Schema', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\UpdateSchemaMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'schema.name', - 'fieldAccessors' => [ - 'getSchema', - 'getName', - ], - ], - ], - ], - 'GetSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Schema', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSchemas' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSchemas', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListSchemasResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationCollectionDataStoreSchema' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationDataStoreSchema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', - 'schema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php deleted file mode 100644 index edb36e463bc5..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/schema_service_rest_client_config.php +++ /dev/null @@ -1,229 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.SchemaService' => [ - 'CreateSchema' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas', - 'body' => 'schema', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', - 'body' => 'schema', - 'queryParams' => [ - 'schema_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'schema_id', - ], - ], - 'DeleteSchema' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSchema' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSchemas' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSchema' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}', - 'body' => 'schema', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}', - 'body' => 'schema', - ], - ], - 'placeholders' => [ - 'schema.name' => [ - 'getters' => [ - 'getSchema', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json deleted file mode 100644 index f98ea3de4901..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1beta.SearchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 5000, - "initial_rpc_timeout_millis": 5000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000, - "total_timeout_millis": 5000 - } - }, - "methods": { - "Search": { - "timeout_millis": 5000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php deleted file mode 100644 index a75a6ceae41e..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_descriptor_config.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.SearchService' => [ - 'Search' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\SearchResponse', - 'headerParams' => [ - [ - 'keyName' => 'serving_config', - 'fieldAccessors' => [ - 'getServingConfig', - ], - ], - ], - ], - 'templateMap' => [ - 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', - 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', - 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php deleted file mode 100644 index 70b3ee95a49a..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/search_service_rest_client_config.php +++ /dev/null @@ -1,152 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.SearchService' => [ - 'Search' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'serving_config' => [ - 'getters' => [ - 'getServingConfig', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json deleted file mode 100644 index 5fe27d73fa58..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_client_config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "interfaces": { - "google.cloud.discoveryengine.v1beta.UserEventService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CollectUserEvent": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ImportUserEvents": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "WriteUserEvent": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php deleted file mode 100644 index 2cb4429f2d60..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_descriptor_config.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.UserEventService' => [ - 'ImportUserEvents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsResponse', - 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\ImportUserEventsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CollectUserEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Api\HttpBody', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'WriteUserEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\UserEvent', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php b/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php deleted file mode 100644 index e204c5c30a2b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/src/V1beta/resources/user_event_service_rest_client_config.php +++ /dev/null @@ -1,188 +0,0 @@ - [ - 'google.cloud.discoveryengine.v1beta.UserEventService' => [ - 'CollectUserEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportUserEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'WriteUserEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write', - 'body' => 'user_event', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write', - 'body' => 'user_event', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php deleted file mode 100644 index 9580255c41b0..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/CompletionServiceClientTest.php +++ /dev/null @@ -1,165 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CompletionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CompletionServiceClient($options); - } - - /** @test */ - public function completeQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $tailMatchTriggered = true; - $expectedResponse = new CompleteQueryResponse(); - $expectedResponse->setTailMatchTriggered($tailMatchTriggered); - $transport->addResponse($expectedResponse); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - $response = $gapicClient->completeQuery($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.CompletionService/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getDataStore(); - $this->assertProtobufEquals($formattedDataStore, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - try { - $gapicClient->completeQuery($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $tailMatchTriggered = true; - $expectedResponse = new CompleteQueryResponse(); - $expectedResponse->setTailMatchTriggered($tailMatchTriggered); - $transport->addResponse($expectedResponse); - // Mock request - $formattedDataStore = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $query = 'query107944136'; - $request = (new CompleteQueryRequest()) - ->setDataStore($formattedDataStore) - ->setQuery($query); - $response = $gapicClient->completeQueryAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.CompletionService/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getDataStore(); - $this->assertProtobufEquals($formattedDataStore, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php deleted file mode 100644 index 7ca4b1e05398..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/DocumentServiceClientTest.php +++ /dev/null @@ -1,732 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DocumentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DocumentServiceClient($options); - } - - /** @test */ - public function createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - $response = $gapicClient->createDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - try { - $gapicClient->createDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new DeleteDocumentRequest()) - ->setName($formattedName); - $gapicClient->deleteDocument($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new DeleteDocumentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new GetDocumentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->documentName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]', '[DOCUMENT]'); - $request = (new GetDocumentRequest()) - ->setName($formattedName); - try { - $gapicClient->getDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ImportDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ImportDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ListDocumentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDocuments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $request = (new ListDocumentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDocuments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $purgeCount = 575305851; - $expectedResponse = new PurgeDocumentsResponse(); - $expectedResponse->setPurgeCount($purgeCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/purgeDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $filter = 'filter-1274492040'; - $request = (new PurgeDocumentsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->purgeDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/PurgeDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function purgeDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $filter = 'filter-1274492040'; - $request = (new PurgeDocumentsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->purgeDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document); - $response = $gapicClient->updateDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document); - try { - $gapicClient->updateDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonData = 'jsonData-1083208543'; - $name = 'name3373707'; - $id = 'id3355'; - $schemaId = 'schemaId-153006983'; - $parentDocumentId = 'parentDocumentId-1870594390'; - $expectedResponse = new Document(); - $expectedResponse->setJsonData($jsonData); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setSchemaId($schemaId); - $expectedResponse->setParentDocumentId($parentDocumentId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->branchName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[BRANCH]'); - $document = new Document(); - $documentId = 'documentId506676927'; - $request = (new CreateDocumentRequest()) - ->setParent($formattedParent) - ->setDocument($document) - ->setDocumentId($documentId); - $response = $gapicClient->createDocumentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.DocumentService/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php deleted file mode 100644 index b4878ec743cb..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/RecommendationServiceClientTest.php +++ /dev/null @@ -1,182 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RecommendationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RecommendationServiceClient($options); - } - - /** @test */ - public function recommendTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $attributionToken = 'attributionToken-729411015'; - $validateOnly2 = true; - $expectedResponse = new RecommendResponse(); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setValidateOnly($validateOnly2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new RecommendRequest()) - ->setServingConfig($formattedServingConfig) - ->setUserEvent($userEvent); - $response = $gapicClient->recommend($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.RecommendationService/Recommend', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function recommendExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new RecommendRequest()) - ->setServingConfig($formattedServingConfig) - ->setUserEvent($userEvent); - try { - $gapicClient->recommend($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function recommendAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $attributionToken = 'attributionToken-729411015'; - $validateOnly2 = true; - $expectedResponse = new RecommendResponse(); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setValidateOnly($validateOnly2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new RecommendRequest()) - ->setServingConfig($formattedServingConfig) - ->setUserEvent($userEvent); - $response = $gapicClient->recommendAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.RecommendationService/Recommend', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php deleted file mode 100644 index 47c87263a568..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SchemaServiceClientTest.php +++ /dev/null @@ -1,669 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SchemaServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SchemaServiceClient($options); - } - - /** @test */ - public function createSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/CreateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $actualValue = $actualApiRequestObject->getSchemaId(); - $this->assertProtobufEquals($schemaId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new DeleteSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/DeleteSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new DeleteSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $jsonSchema = 'jsonSchema-1150390056'; - $name2 = 'name2-1052831874'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new GetSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->getSchema($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/GetSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->schemaName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SCHEMA]'); - $request = (new GetSchemaRequest()) - ->setName($formattedName); - try { - $gapicClient->getSchema($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchemasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $schemasElement = new Schema(); - $schemas = [ - $schemasElement, - ]; - $expectedResponse = new ListSchemasResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSchemas($schemas); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ListSchemasRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSchemas($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/ListSchemas', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchemasExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ListSchemasRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSchemas($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSchemaTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $schema = new Schema(); - $request = (new UpdateSchemaRequest()) - ->setSchema($schema); - $response = $gapicClient->updateSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/UpdateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSchemaExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $schema = new Schema(); - $request = (new UpdateSchemaRequest()) - ->setSchema($schema); - $response = $gapicClient->updateSchema($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSchemaTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSchemaAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSchemaTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $jsonSchema = 'jsonSchema-1150390056'; - $name = 'name3373707'; - $expectedResponse = new Schema(); - $expectedResponse->setJsonSchema($jsonSchema); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSchemaTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $schema = new Schema(); - $schemaId = 'schemaId-153006983'; - $request = (new CreateSchemaRequest()) - ->setParent($formattedParent) - ->setSchema($schema) - ->setSchemaId($schemaId); - $response = $gapicClient->createSchemaAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SchemaService/CreateSchema', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSchema(); - $this->assertProtobufEquals($schema, $actualValue); - $actualValue = $actualApiRequestObject->getSchemaId(); - $this->assertProtobufEquals($schemaId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSchemaTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php deleted file mode 100644 index cf2aa8b35dc4..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/SearchServiceClientTest.php +++ /dev/null @@ -1,188 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SearchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SearchServiceClient($options); - } - - /** @test */ - public function searchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $attributionToken = 'attributionToken-729411015'; - $redirectUri = 'redirectUri951230089'; - $nextPageToken = ''; - $correctedQuery = 'correctedQuery107869074'; - $resultsElement = new SearchResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setRedirectUri($redirectUri); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCorrectedQuery($correctedQuery); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - $response = $gapicClient->search($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SearchService/Search', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - try { - $gapicClient->search($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $attributionToken = 'attributionToken-729411015'; - $redirectUri = 'redirectUri951230089'; - $nextPageToken = ''; - $correctedQuery = 'correctedQuery107869074'; - $resultsElement = new SearchResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setRedirectUri($redirectUri); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCorrectedQuery($correctedQuery); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $formattedServingConfig = $gapicClient->servingConfigName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SERVING_CONFIG]'); - $request = (new SearchRequest()) - ->setServingConfig($formattedServingConfig); - $response = $gapicClient->searchAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.SearchService/Search', $actualFuncCall); - $actualValue = $actualRequestObject->getServingConfig(); - $this->assertProtobufEquals($formattedServingConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php b/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php deleted file mode 100644 index 25ab3d5e665b..000000000000 --- a/owl-bot-staging/DiscoveryEngine/v1beta/tests/Unit/V1beta/Client/UserEventServiceClientTest.php +++ /dev/null @@ -1,390 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return UserEventServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new UserEventServiceClient($options); - } - - /** @test */ - public function collectUserEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $contentType = 'contentType831846208'; - $data = '-86'; - $expectedResponse = new HttpBody(); - $expectedResponse->setContentType($contentType); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->collectUserEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/CollectUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function collectUserEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - try { - $gapicClient->collectUserEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importUserEventsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importUserEventsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $joinedEventsCount = 720068705; - $unjoinedEventsCount = 512159846; - $expectedResponse = new ImportUserEventsResponse(); - $expectedResponse->setJoinedEventsCount($joinedEventsCount); - $expectedResponse->setUnjoinedEventsCount($unjoinedEventsCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importUserEventsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ImportUserEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importUserEvents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/ImportUserEvents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importUserEventsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importUserEventsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $request = (new ImportUserEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importUserEvents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importUserEventsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function writeUserEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $eventType = 'eventType984376767'; - $userPseudoId = 'userPseudoId-1850666040'; - $directUserRequest = false; - $sessionId = 'sessionId1661853540'; - $attributionToken = 'attributionToken-729411015'; - $filter = 'filter-1274492040'; - $expectedResponse = new UserEvent(); - $expectedResponse->setEventType($eventType); - $expectedResponse->setUserPseudoId($userPseudoId); - $expectedResponse->setDirectUserRequest($directUserRequest); - $expectedResponse->setSessionId($sessionId); - $expectedResponse->setAttributionToken($attributionToken); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->writeUserEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/WriteUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeUserEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = new UserEvent(); - $userEventEventType = 'userEventEventType341658661'; - $userEvent->setEventType($userEventEventType); - $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; - $userEvent->setUserPseudoId($userEventUserPseudoId); - $request = (new WriteUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - try { - $gapicClient->writeUserEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function collectUserEventAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $contentType = 'contentType831846208'; - $data = '-86'; - $expectedResponse = new HttpBody(); - $expectedResponse->setContentType($contentType); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); - $userEvent = 'userEvent1921940774'; - $request = (new CollectUserEventRequest()) - ->setParent($formattedParent) - ->setUserEvent($userEvent); - $response = $gapicClient->collectUserEventAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.discoveryengine.v1beta.UserEventService/CollectUserEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserEvent(); - $this->assertProtobufEquals($userEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}